summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-06-24 08:29:10 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-06-24 08:29:10 +0200
commitdb690fbf91c01d1c41bda9c17f98b85f597e30c2 (patch)
treeb32df851660d0d9578c79c974f689a4bf8db8791
parenta5962cf7f592786d1a04aca913d2ee6edc265d22 (diff)
downloadweechat-db690fbf91c01d1c41bda9c17f98b85f597e30c2.zip
irc: do not display message 354 with missing parameters if there's an automatic check of WHOX on the channel (issue #1212)
-rw-r--r--src/plugins/irc/irc-protocol.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 09720aacd..67f4306ba 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -4766,6 +4766,8 @@ IRC_PROTOCOL_CALLBACK(354)
IRC_PROTOCOL_MIN_ARGS(4);
+ ptr_channel = irc_channel_search (server, argv[3]);
+
/*
* if there are less than 11 arguments, we are unable to parse the message,
* some infos are missing but we don't know which ones; in this case we
@@ -4773,7 +4775,7 @@ IRC_PROTOCOL_CALLBACK(354)
*/
if (argc < 11)
{
- if (argc > 3)
+ if ((argc > 3) && (!ptr_channel || (ptr_channel->checking_whox <= 0)))
{
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (
@@ -4787,16 +4789,14 @@ IRC_PROTOCOL_CALLBACK(354)
return WEECHAT_RC_OK;
}
+ ptr_nick = (ptr_channel) ?
+ irc_nick_search (server, ptr_channel, argv[7]) : NULL;
pos_attr = argv[8];
pos_hopcount = argv[9];
pos_account = (strcmp (argv[10], "0") != 0) ? argv[10] : NULL;
pos_realname = (argc > 11) ?
((argv_eol[11][0] == ':') ? argv_eol[11] + 1 : argv_eol[11]) : NULL;
- ptr_channel = irc_channel_search (server, argv[3]);
- ptr_nick = (ptr_channel) ?
- irc_nick_search (server, ptr_channel, argv[7]) : NULL;
-
/* update host in nick */
if (ptr_nick)
{