From d5c391b1ee57730ed6f94c3d7ee5661ceaff35f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Thu, 23 Dec 2021 18:43:12 +0100 Subject: [PATCH] irc: fix display of IRC numeric messages with no parameters For example this MOTD message is properly displayed (empty line): :server.example.com 372 nick : --- ChangeLog.adoc | 7 +++++++ src/plugins/irc/irc-protocol.c | 6 ++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 7ef0cbf37..fb4b547e9 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -15,6 +15,13 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] (file _ReleaseNotes.adoc_ in sources). +[[v3.5]] +== Version 3.5 (under dev) + +Bug fixes:: + + * irc: fix display of IRC numeric messages with no parameters + [[v3.4]] == Version 3.4 (2021-12-18) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index de43a03ab..d02409e15 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -3156,7 +3156,7 @@ IRC_PROTOCOL_CALLBACK(numeric) str_params = irc_protocol_string_params (params, arg_text, num_params - 1); - if (str_params && str_params[0]) + if (str_params) { weechat_printf_date_tags ( irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL), @@ -3165,10 +3165,8 @@ IRC_PROTOCOL_CALLBACK(numeric) "%s%s", weechat_prefix ("network"), str_params); - } - - if (str_params) free (str_params); + } return WEECHAT_RC_OK; }