diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-08-02 13:15:38 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-08-02 13:15:38 +0000 |
commit | 9fa8cbe7a2ac1c17fa4494389b199319ec966aae (patch) | |
tree | d87ae801571f4a7dc7ad05f7f80df4286bc2ed7d /src/fe-common/irc/fe-irc-commands.c | |
parent | d788673eb92d68d796f69e70ab2dddeb01778585 (diff) | |
download | irssi-9fa8cbe7a2ac1c17fa4494389b199319ec966aae.zip |
Revert recode changes r4483 and r4715.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4867 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-commands.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-commands.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/fe-common/irc/fe-irc-commands.c b/src/fe-common/irc/fe-irc-commands.c index 54c5263f..37f8b9ab 100644 --- a/src/fe-common/irc/fe-irc-commands.c +++ b/src/fe-common/irc/fe-irc-commands.c @@ -22,6 +22,7 @@ #include "module-formats.h" #include "signals.h" #include "misc.h" +#include "recode.h" #include "special-vars.h" #include "settings.h" @@ -44,6 +45,7 @@ static void cmd_me(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) { const char *target; + char *recoded; CMD_IRC_SERVER(server); if (!IS_IRC_ITEM(item)) @@ -53,12 +55,15 @@ static void cmd_me(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) cmd_return_error(CMDERR_NOT_CONNECTED); target = window_item_get_target(item); + recoded = recode_out(SERVER(server), data, target); - signal_emit("message irc own_action", 3, server, data, + signal_emit("message irc own_action", 3, server, recoded, item->visible_name); irc_send_cmdv(server, "PRIVMSG %s :\001ACTION %s\001", - target, data); + target, recoded); + + g_free(recoded); } /* SYNTAX: ACTION [-<server tag>] <target> <message> */ @@ -66,6 +71,7 @@ static void cmd_action(const char *data, IRC_SERVER_REC *server) { GHashTable *optlist; const char *target, *text; + char *recoded; void *free_arg; CMD_IRC_SERVER(server); @@ -81,10 +87,12 @@ static void cmd_action(const char *data, IRC_SERVER_REC *server) if (server == NULL || !server->connected) cmd_param_error(CMDERR_NOT_CONNECTED); - irc_send_cmdv(server, "PRIVMSG %s :\001ACTION %s\001", target, text); + recoded = recode_out(SERVER(server), text, target); + irc_send_cmdv(server, "PRIVMSG %s :\001ACTION %s\001", target, recoded); - signal_emit("message irc own_action", 3, server, text, target); + signal_emit("message irc own_action", 3, server, recoded, target); + g_free(recoded); cmd_params_free(free_arg); } @@ -92,6 +100,7 @@ static void cmd_notice(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item) { const char *target, *msg; + char *recoded; void *free_arg; CMD_IRC_SERVER(server); @@ -105,8 +114,10 @@ static void cmd_notice(const char *data, IRC_SERVER_REC *server, if (*target == '\0' || *msg == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); - signal_emit("message irc own_notice", 3, server, msg, target); + recoded = recode_out(SERVER(server), msg, target); + signal_emit("message irc own_notice", 3, server, recoded, target); + g_free(recoded); cmd_params_free(free_arg); } |