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

irc: do not display message with "(null)" for 973/974/975 command received if pos_mode is NULL

This commit is contained in:
Sébastien Helleu
2021-10-14 20:37:32 +02:00
parent 55df7805c2
commit f3b4336bc4
+12 -8
View File
@@ -3057,14 +3057,18 @@ IRC_PROTOCOL_CALLBACK(server_mode_reason)
((argv_eol[3][0] == ':') ? argv_eol[3] + 1 : argv_eol[3]) : NULL;
}
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL),
date,
irc_protocol_tags (command, "irc_numeric", NULL, NULL),
"%s%s: %s",
weechat_prefix ("network"),
pos_mode,
(pos_args) ? pos_args : "");
if (pos_mode)
{
weechat_printf_date_tags (
irc_msgbuffer_get_target_buffer (server, NULL, command, NULL, NULL),
date,
irc_protocol_tags (command, "irc_numeric", NULL, NULL),
"%s%s%s%s",
weechat_prefix ("network"),
pos_mode,
(pos_args) ? ": " : "",
(pos_args) ? pos_args : "");
}
return WEECHAT_RC_OK;
}