diff options
author | Timo Sirainen <cras@irssi.org> | 2000-04-27 12:02:54 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-04-27 12:02:54 +0000 |
commit | b90d2e9cc2580ccb5284d9ae66c8e8e74559c65d (patch) | |
tree | e54710f0a41b2aaea2839fb18293bdc905173ec0 /src/fe-common | |
parent | 142025467eb50b3af7be0495949677c9a93d69c0 (diff) | |
download | irssi-b90d2e9cc2580ccb5284d9ae66c8e8e74559c65d.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-events.c | 12 |
1 files changed, 8 insertions, 4 deletions
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); |