diff options
author | Valentin Batz <senneth@irssi.org> | 2005-10-12 18:22:14 +0000 |
---|---|---|
committer | vb <vb@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2005-10-12 18:22:14 +0000 |
commit | d8d47ef37f6efb290472ae587cefa3df22bd92dc (patch) | |
tree | 45034eb5bb688d2d32f64134db54a44373416be0 /src/fe-common/core | |
parent | fd476e8b319dc7a1d4271ec339df9deb752dc055 (diff) | |
download | irssi-d8d47ef37f6efb290472ae587cefa3df22bd92dc.zip |
fixed recoding of own messages.
recode after expand_emphasis
remove the redundant call to setlocale(LC_CTYPE, )
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4038 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/fe-messages.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index b91f2cf4..3080b99c 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -259,8 +259,6 @@ static void sig_message_own_public(SERVER_REC *server, const char *msg, const char *nickmode; char *freemsg = NULL, *recoded; int print_channel; - /* ugly: recode the sent message back for printing */ - recoded = recode_in(server, msg, target); channel = channel_find(server, target); if (channel != NULL) target = channel->visible_name; @@ -280,6 +278,9 @@ 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); @@ -316,15 +317,16 @@ static void sig_message_own_private(SERVER_REC *server, const char *msg, query = privmsg_get_query(server, target, TRUE, MSGLEVEL_MSGS); + 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); - if (settings_get_bool("emphasis")) - msg = freemsg = expand_emphasis((WI_ITEM_REC *) query, recoded); printformat(server, target, MSGLEVEL_MSGS | MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT, query == NULL ? TXT_OWN_MSG_PRIVATE : - TXT_OWN_MSG_PRIVATE_QUERY, target, msg, server->nick); + TXT_OWN_MSG_PRIVATE_QUERY, target, recoded, server->nick); g_free(recoded); g_free_not_null(freemsg); |