mirror of
https://github.com/irssi/irssi.git
synced 2025-02-02 15:08:01 -05: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:
parent
b6075cf36c
commit
84d672ee42
@ -123,14 +123,16 @@ static void sig_message_public(SERVER_REC *server, const char *msg,
|
|||||||
int for_me, print_channel, level;
|
int for_me, print_channel, level;
|
||||||
char *color, *freemsg;
|
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);
|
chanrec = channel_find(server, target);
|
||||||
g_return_if_fail(chanrec != NULL);
|
|
||||||
|
|
||||||
for_me = nick_match_msg(chanrec, msg, server->nick);
|
for_me = nick_match_msg(chanrec, msg, server->nick);
|
||||||
color = for_me ? NULL :
|
color = for_me ? NULL :
|
||||||
hilight_find_nick(target, nick, address, MSGLEVEL_PUBLIC, msg);
|
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") &&
|
if (!print_channel && settings_get_bool("print_active_channel") &&
|
||||||
window_item_window((WI_ITEM_REC *) chanrec)->items->next != NULL)
|
window_item_window((WI_ITEM_REC *) chanrec)->items->next != NULL)
|
||||||
print_channel = TRUE;
|
print_channel = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user