diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-14 20:37:32 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2021-10-14 20:37:32 +0200 |
commit | f3b4336bc4d7da716d68629ee18e79a512976f04 (patch) | |
tree | 38d3d8f307a425bf77741e509c9d2da179afea3e /src/plugins | |
parent | 55df7805c24c40f6842f2f60ccf43329ce176275 (diff) | |
download | weechat-f3b4336bc4d7da716d68629ee18e79a512976f04.zip |
irc: do not display message with "(null)" for 973/974/975 command received if pos_mode is NULL
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index cde702fb7..a6f432e7f 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -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; } |