1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 14:26:39 +02:00

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 :
This commit is contained in:
Sébastien Helleu
2021-12-23 18:43:12 +01:00
parent 20e219a2c9
commit d5c391b1ee
2 changed files with 9 additions and 4 deletions
+7
View File
@@ -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)
+2 -4
View File
@@ -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;
}