From a5962cf7f592786d1a04aca913d2ee6edc265d22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 23 Jun 2018 22:17:18 +0200 Subject: [PATCH] irc: display message 354 (WHOX) received with missing parameters (closes #1212) --- ChangeLog.adoc | 1 + src/plugins/irc/irc-protocol.c | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 4a77fb57f..a87f2a829 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -45,6 +45,7 @@ Bug fixes:: * core: fix infinite loop in evaluation of strings (issue #1183) * core: change default value of option weechat.look.window_title from "WeeChat ${info:version}" to empty string (issue #1182) * fset: fix crash when applying filters after closing the fset buffer (issue #1204) + * irc: display message 354 (WHOX) received with missing parameters (issue #1212) * irc: always set nick away status on WHO response (sent manually or automatically with server option "away_check") * irc: fix a crash when calling the function hdata_string on the "prefix" variable in the nick * irc: fix split of messages when server option "split_msg_max_length" is set to 0 (no split) (issue #1173) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 143507a7c..09720aacd 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -4766,9 +4766,26 @@ IRC_PROTOCOL_CALLBACK(354) IRC_PROTOCOL_MIN_ARGS(4); - /* silently ignore 354 messages we don't parse (missing infos) */ + /* + * 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 + * just display the message as-is + */ if (argc < 11) + { + if (argc > 3) + { + weechat_printf_date_tags ( + irc_msgbuffer_get_target_buffer ( + server, NULL, command, "who", NULL), + date, + irc_protocol_tags (command, "irc_numeric", NULL, NULL), + "%s%s", + weechat_prefix ("network"), + argv_eol[3]); + } return WEECHAT_RC_OK; + } pos_attr = argv[8]; pos_hopcount = argv[9];