1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 15:26:37 +02:00

relay: return an empty hdata when the requested hdata or pointer is not found (closes #767)

This commit is contained in:
Sébastien Helleu
2016-07-29 15:55:42 +02:00
parent 4397dccd1b
commit 09c52755d1
5 changed files with 68 additions and 3 deletions
@@ -231,11 +231,15 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(hdata)
msg = relay_weechat_msg_new (id);
if (msg)
{
if (relay_weechat_msg_add_hdata (msg, argv[0],
(argc > 1) ? argv_eol[1] : NULL))
if (!relay_weechat_msg_add_hdata (msg, argv[0],
(argc > 1) ? argv_eol[1] : NULL))
{
relay_weechat_msg_send (client, msg);
relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_HDATA);
relay_weechat_msg_add_string (msg, NULL); /* h-path */
relay_weechat_msg_add_string (msg, NULL); /* keys */
relay_weechat_msg_add_int (msg, 0); /* count */
}
relay_weechat_msg_send (client, msg);
relay_weechat_msg_free (msg);
}