1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

If msg comes from unknown channel (like when you just closed some

channel window and server sends the last msg to the channel) irssi now
prints the msg to active window instead of sending glib warning.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1026 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-12-29 00:11:24 +00:00 committed by cras
parent b6075cf36c
commit 84d672ee42

View File

@ -123,14 +123,16 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
int for_me, print_channel, level;
char *color, *freemsg;
/* NOTE: this may return NULL if some channel is just closed with
/WINDOW CLOSE and server still sends the few last messages */
chanrec = channel_find(server, target);
g_return_if_fail(chanrec != NULL);
for_me = nick_match_msg(chanrec, msg, server->nick);
color = for_me ? NULL :
hilight_find_nick(target, nick, address, MSGLEVEL_PUBLIC, msg);
print_channel = !window_item_is_active((WI_ITEM_REC *) chanrec);
print_channel = chanrec == NULL ||
!window_item_is_active((WI_ITEM_REC *) chanrec);
if (!print_channel && settings_get_bool("print_active_channel") &&
window_item_window((WI_ITEM_REC *) chanrec)->items->next != NULL)
print_channel = TRUE;