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/core | |
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/core')
-rw-r--r-- | src/fe-common/core/fe-common-core.c | 1 | ||||
-rw-r--r-- | src/fe-common/core/fe-messages.c | 20 |
2 files changed, 5 insertions, 16 deletions
diff --git a/src/fe-common/core/fe-common-core.c b/src/fe-common/core/fe-common-core.c index fc52950a..a8076158 100644 --- a/src/fe-common/core/fe-common-core.c +++ b/src/fe-common/core/fe-common-core.c @@ -31,7 +31,6 @@ #include "servers.h" #include "channels.h" #include "servers-setup.h" -#include "recode.h" #include "autorun.h" #include "fe-core-commands.h" diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index d9f77e28..e1c0e57a 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -31,7 +31,6 @@ #include "channels.h" #include "nicklist.h" #include "ignore.h" -#include "recode.h" #include "window-items.h" #include "fe-queries.h" @@ -259,7 +258,7 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg, WINDOW_REC *window; CHANNEL_REC *channel; const char *nickmode; - char *freemsg = NULL, *recoded; + char *freemsg = NULL; int print_channel; channel = channel_find(server, target); if (channel != NULL) @@ -280,18 +279,14 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg, if (settings_get_bool("emphasis")) msg = freemsg = expand_emphasis((WI_ITEM_REC *) channel, msg); - /* ugly: recode the sent message back for printing */ - recoded = recode_in(server, msg, target); - if (!print_channel) { printformat(server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, - TXT_OWN_MSG, server->nick, recoded, nickmode); + TXT_OWN_MSG, server->nick, msg, nickmode); } else { printformat(server, target, MSGLEVEL_PUBLIC | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, - TXT_OWN_MSG_CHANNEL, server->nick, target, recoded, nickmode); + TXT_OWN_MSG_CHANNEL, server->nick, target, msg, nickmode); } - g_free(recoded); g_free_not_null(freemsg); } @@ -299,7 +294,7 @@ static void sig_message_own_private(SERVER_REC *server, const char *msg, const char *target, const char *origtarget) { QUERY_REC *query; - char *freemsg = NULL, *recoded; + char *freemsg = NULL; g_return_if_fail(server != NULL); g_return_if_fail(msg != NULL); @@ -322,15 +317,11 @@ static void sig_message_own_private(SERVER_REC *server, const char *msg, if (settings_get_bool("emphasis")) msg = freemsg = expand_emphasis((WI_ITEM_REC *) query, msg); - /* ugly: recode the sent message back for printing */ - recoded = recode_in(server, msg, target); - printformat(server, target, MSGLEVEL_MSGS | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, query == NULL ? TXT_OWN_MSG_PRIVATE : - TXT_OWN_MSG_PRIVATE_QUERY, target, recoded, server->nick); + TXT_OWN_MSG_PRIVATE_QUERY, target, msg, server->nick); - g_free(recoded); g_free_not_null(freemsg); } @@ -411,7 +402,6 @@ static void sig_message_quit(SERVER_REC *server, const char *nick, if (once || count == 0) { if (chans->len > 0) g_string_truncate(chans, chans->len-1); - /* at least recode_fallback will be used */ printformat(server, print_channel, MSGLEVEL_QUITS, count <= 1 ? TXT_QUIT : TXT_QUIT_ONCE, nick, address, reason, chans->str); |