diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-11-04 14:05:57 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-11-04 14:05:57 +0000 |
commit | 483589efb53506884565ca67f694df9e47f1c52e (patch) | |
tree | 9a883cedc42a7957b10c33e0ea8a9adcdeaaa29d /src/fe-common | |
parent | b555e1898593107fe3e87de55771f3959a51d582 (diff) | |
download | irssi-483589efb53506884565ca67f694df9e47f1c52e.zip |
Recode an incoming quit message once with a nick charset preference rather than
doing it for every joined channel the user was in with a channel charset
preference.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4885 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/fe-messages.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c index d3949a31..c3f4ab48 100644 --- a/src/fe-common/core/fe-messages.c +++ b/src/fe-common/core/fe-messages.c @@ -367,6 +367,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick, count = 0; windows = NULL; chans = g_string_new(NULL); + recoded = recode_in(server, reason, nick); for (tmp = server->channels; tmp != NULL; tmp = tmp->next) { CHANNEL_REC *rec = tmp->data; @@ -389,12 +390,10 @@ static void sig_message_quit(SERVER_REC *server, const char *nick, window = window_item_window((WI_ITEM_REC *) rec); if (g_slist_find(windows, window) == NULL) { windows = g_slist_append(windows, window); - recoded = recode_in(server, reason, rec->visible_name); printformat(server, rec->visible_name, MSGLEVEL_QUITS, TXT_QUIT, nick, address, recoded, rec->visible_name); - g_free(recoded); } } count++; @@ -406,24 +405,20 @@ static void sig_message_quit(SERVER_REC *server, const char *nick, display the quit there too */ QUERY_REC *query = query_find(server, nick); if (query != NULL) { - recoded = recode_in(server, reason, nick); printformat(server, nick, MSGLEVEL_QUITS, TXT_QUIT, nick, address, recoded, ""); - g_free(recoded); } } if (once || count == 0) { if (chans->len > 0) g_string_truncate(chans, chans->len-1); - /* at least recode_fallback will be used */ - recoded = recode_in(server, reason, nick); printformat(server, print_channel, MSGLEVEL_QUITS, count <= 1 ? TXT_QUIT : TXT_QUIT_ONCE, nick, address, recoded, chans->str); - g_free(recoded); } g_string_free(chans, TRUE); + g_free(recoded); } static void sig_message_kick(SERVER_REC *server, const char *channel, |