summaryrefslogtreecommitdiff
path: root/src/fe-common/core/fe-messages.c
diff options
context:
space:
mode:
authorValentin Batz <senneth@irssi.org>2004-09-15 12:11:43 +0000
committersenneth <senneth@dbcabf3a-b0e7-0310-adc4-f8d773084564>2004-09-15 12:11:43 +0000
commit8ea717b67609a7ddaa6481e49fc638a4b40e84e8 (patch)
tree10e28c5a7f6ade72b86ad7fd8c680320ecafa36b /src/fe-common/core/fe-messages.c
parent55bcc420a713d5bfac3813f7bc002de0b0c13538 (diff)
downloadirssi-8ea717b67609a7ddaa6481e49fc638a4b40e84e8.zip
Fixed memleak in recode.c, fixed typo in special_vars.txt, fixed bug 105, fixed bug 106
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3295 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-messages.c')
-rw-r--r--src/fe-common/core/fe-messages.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/fe-common/core/fe-messages.c b/src/fe-common/core/fe-messages.c
index f0015f20..d5b011c5 100644
--- a/src/fe-common/core/fe-messages.c
+++ b/src/fe-common/core/fe-messages.c
@@ -31,6 +31,7 @@
#include "channels.h"
#include "nicklist.h"
#include "ignore.h"
+#include "recode.h"
#include "window-items.h"
#include "fe-queries.h"
@@ -330,7 +331,7 @@ static void sig_message_quit(SERVER_REC *server, const char *nick,
WINDOW_REC *window;
GString *chans;
GSList *tmp, *windows;
- char *print_channel;
+ char *print_channel, *recoded;
int once, count;
if (ignore_check(server, nick, address, NULL, reason, MSGLEVEL_QUITS))
@@ -363,10 +364,12 @@ 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(reason, rec->visible_name);
printformat(server, rec->visible_name,
MSGLEVEL_QUITS,
- TXT_QUIT, nick, address, reason,
+ TXT_QUIT, nick, address, recoded,
rec->visible_name);
+ g_free(recoded);
}
}
count++;
@@ -378,17 +381,22 @@ 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(reason, nick);
printformat(server, nick, MSGLEVEL_QUITS,
- TXT_QUIT, nick, address, reason, "");
+ 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(reason, NULL);
printformat(server, print_channel, MSGLEVEL_QUITS,
count <= 1 ? TXT_QUIT : TXT_QUIT_ONCE,
- nick, address, reason, chans->str);
+ nick, address, recoded, chans->str);
+ g_free(recoded);
}
g_string_free(chans, TRUE);
}