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 | |
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')
-rw-r--r-- | src/core/Makefile.am | 2 | ||||
-rw-r--r-- | src/core/chat-commands.c | 12 | ||||
-rw-r--r-- | src/core/core.c | 3 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 707f8b86..59ae0a8d 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -36,6 +36,7 @@ libcore_a_SOURCES = \ pidwait.c \ queries.c \ rawlog.c \ + recode.c \ servers.c \ servers-reconnect.c \ servers-setup.c \ @@ -84,6 +85,7 @@ pkginc_core_HEADERS = \ pidwait.h \ queries.h \ rawlog.h \ + recode.h \ servers.h \ servers-reconnect.h \ servers-setup.h \ 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); } diff --git a/src/core/core.c b/src/core/core.c index b4e6d6e0..6b1aad56 100644 --- a/src/core/core.c +++ b/src/core/core.c @@ -40,6 +40,7 @@ #include "log.h" #include "rawlog.h" #include "ignore.h" +#include "recode.h" #include "channels.h" #include "queries.h" @@ -241,6 +242,7 @@ void core_init(int argc, char *argv[]) log_init(); log_away_init(); rawlog_init(); + recode_init(); channels_init(); queries_init(); @@ -276,6 +278,7 @@ void core_deinit(void) queries_deinit(); channels_deinit(); + recode_deinit(); rawlog_deinit(); log_away_deinit(); log_deinit(); |