diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-02-16 23:28:53 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-02-16 23:28:53 +0000 |
commit | 0eb386ecd88140863c6377ef18764844103b68d9 (patch) | |
tree | ca109e2b94b304495408e6bacdbe189ec3289f9f /src/fe-common/irc/fe-irc-messages.c | |
parent | a0400dc3d23c01655b15a4486f8bd5b3c97b75cc (diff) | |
download | irssi-0eb386ecd88140863c6377ef18764844103b68d9.zip |
Move output recoding in irc_send_cmd_full.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4715 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-messages.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-messages.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/src/fe-common/irc/fe-irc-messages.c b/src/fe-common/irc/fe-irc-messages.c index 4b2301c3..36194a9b 100644 --- a/src/fe-common/irc/fe-irc-messages.c +++ b/src/fe-common/irc/fe-irc-messages.c @@ -24,7 +24,6 @@ #include "channels.h" #include "ignore.h" #include "settings.h" -#include "recode.h" #include "irc-servers.h" #include "irc-channels.h" @@ -68,7 +67,7 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg, const char *target, const char *origtarget) { const char *oldtarget; - char *nickmode, *recoded; + char *nickmode; oldtarget = target; target = skip_target(IRC_SERVER(server), target); @@ -78,15 +77,12 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg, nickmode = channel_get_nickmode(channel_find(server, target), server->nick); - /* ugly: recode the sent message back for printing */ - recoded = recode_in(SERVER(server), msg, target); printformat_module("fe-common/core", server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, TXT_OWN_MSG_CHANNEL, - server->nick, oldtarget, recoded, nickmode); + server->nick, oldtarget, msg, nickmode); g_free(nickmode); - g_free(recoded); signal_stop(); } @@ -114,21 +110,18 @@ static void sig_message_irc_op_public(SERVER_REC *server, const char *msg, static void sig_message_own_wall(SERVER_REC *server, const char *msg, const char *target) { - char *nickmode, *optarget, *recoded; + char *nickmode, *optarget; nickmode = channel_get_nickmode(channel_find(server, target), server->nick); optarget = g_strconcat("@", target, NULL); - /* ugly: recode the sent message back for printing */ - recoded = recode_in(SERVER(server), msg, target); printformat_module("fe-common/core", server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, TXT_OWN_MSG_CHANNEL, - server->nick, optarget, recoded, nickmode); + server->nick, optarget, msg, nickmode); g_free(nickmode); - g_free(recoded); g_free(optarget); } @@ -137,7 +130,7 @@ static void sig_message_own_action(IRC_SERVER_REC *server, const char *msg, { void *item; const char *oldtarget; - char *freemsg = NULL, *recoded; + char *freemsg = NULL; oldtarget = target; target = skip_target(IRC_SERVER(server), target); @@ -149,15 +142,11 @@ static void sig_message_own_action(IRC_SERVER_REC *server, const char *msg, if (settings_get_bool("emphasis")) msg = freemsg = expand_emphasis(item, msg); - /* ugly: recode the sent message back for printing */ - recoded = recode_in(SERVER(server), msg, target); - printformat(server, target, MSGLEVEL_ACTIONS | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT | (ischannel(*target) ? MSGLEVEL_PUBLIC : MSGLEVEL_MSGS), item != NULL && oldtarget == target ? IRCTXT_OWN_ACTION : IRCTXT_OWN_ACTION_TARGET, - server->nick, recoded, oldtarget); - g_free(recoded); + server->nick, msg, oldtarget); g_free_not_null(freemsg); } @@ -213,12 +202,9 @@ static void sig_message_irc_action(IRC_SERVER_REC *server, const char *msg, static void sig_message_own_notice(IRC_SERVER_REC *server, const char *msg, const char *target) { - /* ugly: recode the sent message back for printing */ - char *recoded = recode_in(SERVER(server), msg, target); printformat(server, skip_target(server, target), MSGLEVEL_NOTICES | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, - IRCTXT_OWN_NOTICE, target, recoded); - g_free(recoded); + IRCTXT_OWN_NOTICE, target, msg); } static void sig_message_irc_notice(SERVER_REC *server, const char *msg, |