From b90d2e9cc2580ccb5284d9ae66c8e8e74559c65d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 27 Apr 2000 12:02:54 +0000 Subject: show_quit_once displayed the quit window always in active window. now it's displayed in first window that contains a channel where the nick was. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@188 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/irc/fe-events.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/fe-common') diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c index 7ea6ea25..49b8e3c4 100644 --- a/src/fe-common/irc/fe-events.c +++ b/src/fe-common/irc/fe-events.c @@ -271,15 +271,16 @@ static void event_quit(const char *data, IRC_SERVER_REC *server, const char *nic { GString *chans; GSList *tmp; + char *print_channel; int once; g_return_if_fail(data != NULL); - if (ignore_check(server, nick, addr, NULL, NULL, MSGLEVEL_QUITS)) - return; - if (*data == ':') data++; /* quit message */ + if (ignore_check(server, nick, addr, NULL, data, MSGLEVEL_QUITS)) + return; + print_channel = NULL; once = settings_get_bool("show_quit_once"); chans = !once ? NULL : g_string_new(NULL); for (tmp = channels; tmp != NULL; tmp = tmp->next) { @@ -287,6 +288,9 @@ static void event_quit(const char *data, IRC_SERVER_REC *server, const char *nic if (rec->server == server && nicklist_find(rec, nick) && !ignore_check(server, nick, addr, rec->name, data, MSGLEVEL_QUITS)) { + if (print_channel == NULL || active_win->active == (WI_ITEM_REC *) rec) + print_channel = rec->name; + if (once) g_string_sprintfa(chans, "%s,", rec->name); else @@ -296,7 +300,7 @@ static void event_quit(const char *data, IRC_SERVER_REC *server, const char *nic if (once) { g_string_truncate(chans, chans->len-1); - printformat(server, NULL, MSGLEVEL_QUITS, + printformat(server, print_channel, MSGLEVEL_QUITS, chans->len == 0 ? IRCTXT_QUIT : IRCTXT_QUIT_ONCE, nick, addr, data, chans->str); g_string_free(chans, TRUE); -- cgit v1.2.3