mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
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
This commit is contained in:
parent
55bcc420a7
commit
8ea717b676
26 changed files with 662 additions and 202 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue