summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/en/weechat_relay_protocol.en.txt2
-rw-r--r--src/plugins/relay/weechat/relay-weechat-protocol.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/doc/en/weechat_relay_protocol.en.txt b/doc/en/weechat_relay_protocol.en.txt
index f3ef38d6e..2ec32ffb0 100644
--- a/doc/en/weechat_relay_protocol.en.txt
+++ b/doc/en/weechat_relay_protocol.en.txt
@@ -418,7 +418,9 @@ Returned objects (in this order):
| Type | Type (in message) | Value
| char | chr | 65 ("A")
| integer | int | 123456
+| integer | int | -123456
| long | lon | 1234567890
+| long | lon | -1234567890
| string | str | "a string"
| string | str | ""
| string | str | NULL
diff --git a/src/plugins/relay/weechat/relay-weechat-protocol.c b/src/plugins/relay/weechat/relay-weechat-protocol.c
index 0f0f25546..b693e8b94 100644
--- a/src/plugins/relay/weechat/relay-weechat-protocol.c
+++ b/src/plugins/relay/weechat/relay-weechat-protocol.c
@@ -1035,10 +1035,18 @@ RELAY_WEECHAT_PROTOCOL_CALLBACK(test)
relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_INT);
relay_weechat_msg_add_int (msg, 123456);
+ /* integer (negative) */
+ relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_INT);
+ relay_weechat_msg_add_int (msg, -123456);
+
/* long */
relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_LONG);
relay_weechat_msg_add_long (msg, 1234567890L);
+ /* long (negative) */
+ relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_LONG);
+ relay_weechat_msg_add_long (msg, -1234567890L);
+
/* string */
relay_weechat_msg_add_type (msg, RELAY_WEECHAT_MSG_OBJ_STRING);
relay_weechat_msg_add_string (msg, "a string");