summaryrefslogtreecommitdiff
path: root/doc/it
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-06-22 20:38:13 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-06-24 21:02:03 +0200
commitb1cf12700d6c928e0550d97a9c1da7b188f81dc1 (patch)
treea923ed6fd2b5634693f97a449446f35745d84d3c /doc/it
parent8ea1ee06e5ac18a000788851f807cb4fad3e076c (diff)
downloadweechat-b1cf12700d6c928e0550d97a9c1da7b188f81dc1.zip
irc: add keys/values with tags in output of irc_message_parse_to_hashtable (issue #1654)
Key is "tag_xxx" (where "xxx" is the name of tag) and value is the unescaped tag value.
Diffstat (limited to 'doc/it')
-rw-r--r--doc/it/weechat_plugin_api.it.adoc14
-rw-r--r--doc/it/weechat_scripting.it.adoc19
2 files changed, 21 insertions, 12 deletions
diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc
index 5618bd8a2..f99fe73cf 100644
--- a/doc/it/weechat_plugin_api.it.adoc
+++ b/doc/it/weechat_plugin_api.it.adoc
@@ -16208,12 +16208,14 @@ if (hashtable_in)
weechat_hashtable_set (
hashtable_in,
"message",
- "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!");
+ "@time=2015-06-27T16:40:35.000Z;tag2=value\\sspace :nick!user@host PRIVMSG #weechat :hello!");
hashtable_out = weechat_info_get_hashtable ("irc_message_parse",
hashtable_in);
/*
* now hashtable_out has following keys/values:
- * "tags" : "time=2015-06-27T16:40:35.000Z"
+ * "tags" : "time=2015-06-27T16:40:35.000Z;tag2=value\\sspace"
+ * "tag_time" : "2015-06-27T16:40:35.000Z"
+ * "tag_tag2" : "value space"
* "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!"
* "nick" : "nick"
* "user" : "user"
@@ -16222,10 +16224,10 @@ if (hashtable_in)
* "channel" : "#weechat"
* "arguments" : "#weechat :hello!"
* "text" : "hello!"
- * "pos_command" : "47"
- * "pos_arguments" : "55"
- * "pos_channel" : "55"
- * "pos_text" : "65"
+ * "pos_command" : "65"
+ * "pos_arguments" : "73"
+ * "pos_channel" : "73"
+ * "pos_text" : "83"
*/
weechat_hashtable_free (hashtable_in);
weechat_hashtable_free (hashtable_out);
diff --git a/doc/it/weechat_scripting.it.adoc b/doc/it/weechat_scripting.it.adoc
index 1922682a5..2a1b96a66 100644
--- a/doc/it/weechat_scripting.it.adoc
+++ b/doc/it/weechat_scripting.it.adoc
@@ -1340,6 +1340,11 @@ The result is a hashtable with following keys
The tags in message (can be empty). |
`+time=2015-06-27T16:40:35.000Z+`
+// TRANSLATION MISSING
+| tag_xxx | 3.3 |
+ Unescaped value of tag "xxx" (one key per tag). |
+ `+2015-06-27T16:40:35.000Z+`
+
| message_without_tags | 0.4.0 |
The message without the tags (the same as message if there are no tags). |
`+:nick!user@host PRIVMSG #weechat :hello!+`
@@ -1398,10 +1403,12 @@ The result is a hashtable with following keys
----
dict = weechat.info_get_hashtable(
"irc_message_parse",
- {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+ {"message": "@time=2015-06-27T16:40:35.000Z;tag2=value\\sspace :nick!user@host PRIVMSG #weechat :hello!"})
# dict == {
-# "tags": "time=2015-06-27T16:40:35.000Z",
+# "tags": "time=2015-06-27T16:40:35.000Z;tag2=value\\sspace",
+# "tag_time": "2015-06-27T16:40:35.000Z",
+# "tag_tag2": "value space",
# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
# "nick": "nick",
# "user": "user",
@@ -1410,10 +1417,10 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
-# "pos_command": "47",
-# "pos_arguments": "55",
-# "pos_channel": "55",
-# "pos_text": "65",
+# "pos_command": "65",
+# "pos_arguments": "73",
+# "pos_channel": "73",
+# "pos_text": "83",
# }
----