diff options
author | Timo Sirainen <cras@irssi.org> | 2004-08-20 00:03:40 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-08-20 00:03:40 +0000 |
commit | 226a567562cf1f9a95ea08383838e11c20fb98c3 (patch) | |
tree | 484a82b46cf0ae9e93002b567c8dd43e70fefaf8 /src/core/chat-commands.c | |
parent | 924ac8f91f87d9034dedb711ec33fe714f91a860 (diff) | |
download | irssi-226a567562cf1f9a95ea08383838e11c20fb98c3.zip |
Recode patch by decadix/senneth
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3283 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/chat-commands.c')
-rw-r--r-- | src/core/chat-commands.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index 85576df8..06fe5ce2 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -24,6 +24,7 @@ #include "commands.h" #include "special-vars.h" #include "settings.h" +#include "recode.h" #include "chat-protocols.h" #include "servers.h" @@ -349,7 +350,7 @@ static void cmd_join(const char *data, SERVER_REC *server) static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { GHashTable *optlist; - char *target, *origtarget, *msg; + char *target, *origtarget, *msg, *recoded; void *free_arg; int free_ret, target_type = SEND_TARGET_NICK; @@ -401,15 +402,16 @@ static void cmd_msg(const char *data, SERVER_REC *server, WI_ITEM_REC *item) SEND_TARGET_CHANNEL : SEND_TARGET_NICK; } } - + recoded = recode_out(msg, target); if (target != NULL) { - signal_emit("server sendmsg", 4, server, target, msg, + signal_emit("server sendmsg", 4, server, target, recoded, GINT_TO_POINTER(target_type)); } signal_emit(target != NULL && target_type == SEND_TARGET_CHANNEL ? "message own_public" : "message own_private", 4, - server, msg, target, origtarget); - + server, recoded, target, origtarget); + + g_free(recoded); if (free_ret && target != NULL) g_free(target); cmd_params_free(free_arg); } |