summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/de/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/de/weechat_scripting.de.asciidoc70
-rw-r--r--doc/de/weechat_user.de.asciidoc4
-rw-r--r--doc/en/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/en/weechat_plugin_api.en.asciidoc24
-rw-r--r--doc/en/weechat_scripting.en.asciidoc66
-rw-r--r--doc/en/weechat_user.en.asciidoc2
-rw-r--r--doc/fr/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/fr/weechat_plugin_api.fr.asciidoc24
-rw-r--r--doc/fr/weechat_scripting.fr.asciidoc67
-rw-r--r--doc/fr/weechat_user.fr.asciidoc2
-rw-r--r--doc/it/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/it/weechat_plugin_api.it.asciidoc25
-rw-r--r--doc/it/weechat_scripting.it.asciidoc67
-rw-r--r--doc/it/weechat_user.it.asciidoc2
-rw-r--r--doc/ja/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc25
-rw-r--r--doc/ja/weechat_scripting.ja.asciidoc67
-rw-r--r--doc/ja/weechat_user.ja.asciidoc4
-rw-r--r--doc/pl/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/pl/weechat_scripting.pl.asciidoc70
-rw-r--r--doc/pl/weechat_user.pl.asciidoc4
22 files changed, 463 insertions, 72 deletions
diff --git a/doc/de/autogen/plugin_api/infos_hashtable.asciidoc b/doc/de/autogen/plugin_api/infos_hashtable.asciidoc
index 97f6aa408..f0374c2f2 100644
--- a/doc/de/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/de/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| Erweiterung | Name | Beschreibung | Hashtable (Eingabe) | Hashtable (Ausgabe)
-| irc | irc_message_parse | Parse eine IRC Nachricht | "message": IRC Nachricht, "server": Servername (optional) | "tags": Tags, "message_without_tags": Nachrichten ohne Tags, "nick": Nick, "host": Host, "command": Befehl, "channel": Channel, "arguments": Argumente (schließt Channel ein)
+| irc | irc_message_parse | Parse eine IRC Nachricht | "message": IRC Nachricht, "server": Servername (optional) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
| irc | irc_message_split | dient zum Aufteilen einer überlangen IRC Nachricht (in maximal 512 Bytes große Nachrichten) | "message": IRC Nachricht, "server": Servername (optional) | "msg1" ... "msgN": Nachrichten die versendet werden sollen (ohne abschließendes "\r\n"), "args1" ... "argsN": Argumente für Nachrichten, "count": Anzahl der Nachrichten
diff --git a/doc/de/weechat_scripting.de.asciidoc b/doc/de/weechat_scripting.de.asciidoc
index 7b191e6f7..dae199a7c 100644
--- a/doc/de/weechat_scripting.de.asciidoc
+++ b/doc/de/weechat_scripting.de.asciidoc
@@ -918,16 +918,72 @@ Eine fehlerhafte Nachricht kann WeeChat zum Absturz bringen oder andere ernsthaf
_Neu seit Version 0.3.4._
-Man kann IRC Nachrichten mittels einer info_hashtable mit dem Namen "irc_message_parse" parsen.
+Man kann IRC Nachrichten mittels einer info_hashtable mit dem Namen
+"irc_message_parse" parsen.
+
+// TRANSLATION MISSING
+The result is a hashtable with following keys
+(the example values are built with this message:
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Key | WeeChat version | Description | Example
+
+| tags | ≥ 0.4.0 |
+ The tags in message (can be empty) |
+ `time=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!`
+
+| nick | ≥ 0.3.4 |
+ The origin nick |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ The origin host (includes the nick) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ The command ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ The target channel |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ The command arguments (includes the channel) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ The text (for example user message) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ The index of text in message ("-1" if text was not found) |
+ `65`
+|===
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message here"})
-weechat.prnt("", "dict: %s" % dict)
-
-# output:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/de/weechat_user.de.asciidoc b/doc/de/weechat_user.de.asciidoc
index de3b81674..423ea7edf 100644
--- a/doc/de/weechat_user.de.asciidoc
+++ b/doc/de/weechat_user.de.asciidoc
@@ -3320,6 +3320,10 @@ und die Daten in einer Hashtable gesichert:
| command | string | IRC Befehl (Beispiel: "PRIVMSG", "NOTICE", ...)
| channel | string | IRC Channel
| arguments | string | Argumente des Befehls (Beinhaltet Wert von 'channel')
+// TRANSLATION MISSING
+| text | string | Text (for example user message)
+// TRANSLATION MISSING
+| pos_text | string | The index of text in message ("-1" if text was not found)
|===
// TRANSLATION MISSING
diff --git a/doc/en/autogen/plugin_api/infos_hashtable.asciidoc b/doc/en/autogen/plugin_api/infos_hashtable.asciidoc
index 705a68bd1..8987746c6 100644
--- a/doc/en/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/en/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| Plugin | Name | Description | Hashtable (input) | Hashtable (output)
-| irc | irc_message_parse | parse an IRC message | "message": IRC message, "server": server name (optional) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel)
+| irc | irc_message_parse | parse an IRC message | "message": IRC message, "server": server name (optional) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
| irc | irc_message_split | split an IRC message (to fit in 512 bytes) | "message": IRC message, "server": server name (optional) | "msg1" ... "msgN": messages to send (without final "\r\n"), "args1" ... "argsN": arguments of messages, "count": number of messages
diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc
index ae81a8f3b..cca10ff35 100644
--- a/doc/en/weechat_plugin_api.en.asciidoc
+++ b/doc/en/weechat_plugin_api.en.asciidoc
@@ -12902,23 +12902,33 @@ hashtable_in = weechat_hashtable_new (8,
NULL);
if (hashtable_in)
{
- weechat_hashtable_set (hashtable_in, "message",
- ":nick!user@host PRIVMSG #weechat :message here");
+ weechat_hashtable_set (
+ hashtable_in,
+ "message",
+ "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!");
hashtable_out = weechat_info_get_hashtable ("irc_message_parse",
hashtable_in);
/*
* now hashtable_out has following keys/values:
- * "nick" : "nick"
- * "host" : "nick!user@host"
- * "command" : "PRIVMSG"
- * "channel" : "#weechat"
- * "arguments": "#weechat :message here"
+ * "tags" : "time=2015-06-27T16:40:35.000Z"
+ * "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!"
+ * "nick" : "nick"
+ * "host" : "nick!user@host"
+ * "command" : "PRIVMSG"
+ * "channel" : "#weechat"
+ * "arguments" : "#weechat :hello!"
+ * "text" : "hello!"
+ * "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
weechat_hashtable_free (hashtable_out);
}
----
+[NOTE]
+See the 'WeeChat Scripting Guide' for more info about "irc_message_parse"
+output.
+
Script (Python):
[source,python]
diff --git a/doc/en/weechat_scripting.en.asciidoc b/doc/en/weechat_scripting.en.asciidoc
index b8864a26d..3fc5e5f12 100644
--- a/doc/en/weechat_scripting.en.asciidoc
+++ b/doc/en/weechat_scripting.en.asciidoc
@@ -899,14 +899,68 @@ _New in version 0.3.4._
You can parse an IRC message with info_hashtable called "irc_message_parse".
+The result is a hashtable with following keys
+(the example values are built with this message:
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Key | WeeChat version | Description | Example
+
+| tags | ≥ 0.4.0 |
+ The tags in message (can be empty) |
+ `time=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!`
+
+| nick | ≥ 0.3.4 |
+ The origin nick |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ The origin host (includes the nick) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ The command ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ The target channel |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ The command arguments (includes the channel) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ The text (for example user message) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ The index of text in message ("-1" if text was not found) |
+ `65`
+|===
+
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message here"})
-weechat.prnt("", "dict: %s" % dict)
-
-# output:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/en/weechat_user.en.asciidoc b/doc/en/weechat_user.en.asciidoc
index b638262ce..a07c4db23 100644
--- a/doc/en/weechat_user.en.asciidoc
+++ b/doc/en/weechat_user.en.asciidoc
@@ -3236,6 +3236,8 @@ is added in hashtable:
| command | string | IRC command (example: "PRIVMSG", "NOTICE", ...)
| channel | string | IRC channel
| arguments | string | Arguments of command (includes value of 'channel')
+| text | string | Text (for example user message)
+| pos_text | string | The index of text in message ("-1" if text was not found)
|===
When the data is a pointer, the variable `tg_signal_data` can be used like this
diff --git a/doc/fr/autogen/plugin_api/infos_hashtable.asciidoc b/doc/fr/autogen/plugin_api/infos_hashtable.asciidoc
index a6c076e09..7d84565b5 100644
--- a/doc/fr/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/fr/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| Extension | Nom | Description | Table de hachage (entrée) | Table de hachage (sortie)
-| irc | irc_message_parse | analyse un message IRC | "message" : message IRC, "server" : nom du serveur (optionnel) | "tags" : étiquettes, "message_without_tags" : message sans les étiquettes, "nick" : pseudo, "host" : nom d'hôte, "command" : commande, "channel" : canal, "arguments" : paramètres (inclut le canal)
+| irc | irc_message_parse | analyse un message IRC | "message" : message IRC, "server" : nom du serveur (optionnel) | "tags" : étiquettes, "message_without_tags" : message sans les étiquettes, "nick" : pseudo, "host" : nom d'hôte, "command" : commande, "channel" : canal, "arguments" : paramètres (inclut le canal), "text" : texte (par exemple message utilisateur), "pos_text" : index du texte dans le message ("-1" si aucun texte n'a été trouvé)
| irc | irc_message_split | découper un message IRC (pour tenir dans les 512 octets) | "message" : message IRC, "server" : nom du serveur (optionnel) | "msg1" ... "msgN" : messages à envoyer (sans le "\r\n" final), "args1" ... "argsN" : paramètres des messages, "count" : nombre de messages
diff --git a/doc/fr/weechat_plugin_api.fr.asciidoc b/doc/fr/weechat_plugin_api.fr.asciidoc
index 4a3a1070a..026c1da74 100644
--- a/doc/fr/weechat_plugin_api.fr.asciidoc
+++ b/doc/fr/weechat_plugin_api.fr.asciidoc
@@ -13151,23 +13151,33 @@ hashtable_in = weechat_hashtable_new (8,
NULL);
if (hashtable_in)
{
- weechat_hashtable_set (hashtable_in, "message",
- ":nick!user@host PRIVMSG #weechat :message ici");
+ weechat_hashtable_set (
+ hashtable_in,
+ "message",
+ "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!");
hashtable_out = weechat_info_get_hashtable ("irc_message_parse",
hashtable_in);
/*
* maintenant hashtable_out a les clés/valeurs suivantes :
- * "nick" : "nick"
- * "host" : "nick!user@host"
- * "command" : "PRIVMSG"
- * "channel" : "#weechat"
- * "arguments": "#weechat :message ici"
+ * "tags" : "time=2015-06-27T16:40:35.000Z"
+ * "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!"
+ * "nick" : "nick"
+ * "host" : "nick!user@host"
+ * "command" : "PRIVMSG"
+ * "channel" : "#weechat"
+ * "arguments" : "#weechat :hello!"
+ * "text" : "hello!"
+ * "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
weechat_hashtable_free (hashtable_out);
}
----
+[NOTE]
+Voir le 'Guide pour Scripts WeeChat' pour plus d'infos sur la sortie de
+"irc_message_parse".
+
Script (Python) :
[source,python]
diff --git a/doc/fr/weechat_scripting.fr.asciidoc b/doc/fr/weechat_scripting.fr.asciidoc
index b4a992ba9..bcbd659f6 100644
--- a/doc/fr/weechat_scripting.fr.asciidoc
+++ b/doc/fr/weechat_scripting.fr.asciidoc
@@ -922,14 +922,69 @@ _Nouveau dans la version 0.3.4._
Vous pouvez analyser un message IRC avec l'info_hashtable appelée
"irc_message_parse".
+Le résultat est une table de hachage avec les clés suivantes
+(les exemples de valeurs sont construits avec ce message :
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Clé | Version de WeeChat | Description | Exemple
+
+| tags | ≥ 0.4.0 |
+ Les étiquettes dans le message (peut être vide) |
+ `time=2015-06-27T16:40:35.000Z`
+
+| message_without_tags | ≥ 0.4.0 |
+ Le message sans les étiquettes (la même chose que le message s'il n'y a pas
+ d'étiquettes) |
+ `:nick!user@host PRIVMSG #weechat :hello!`
+
+| nick | ≥ 0.3.4 |
+ Le pseudo d'origine |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ L'hôte d'origine (incluant le pseudo) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ La commande ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ Le canal cible |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ Les paramètres de la commande (incluant le canal) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ Le texte (par exemple un message utilisateur) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ La position du texte dans le message ("-1" si le texte n'a pas été trouvé) |
+ `65`
+|===
+
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message ici"})
-weechat.prnt("", "dict: %s" % dict)
-
-# output:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message ici', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/fr/weechat_user.fr.asciidoc b/doc/fr/weechat_user.fr.asciidoc
index c3724a4a4..de247317e 100644
--- a/doc/fr/weechat_user.fr.asciidoc
+++ b/doc/fr/weechat_user.fr.asciidoc
@@ -3339,6 +3339,8 @@ suivantes sont ajoutées dans la table de hachage :
| command | chaîne | Commande IRC (exemple : "PRIVMSG", "NOTICE", ...)
| channel | chaîne | Canal IRC
| arguments | chaîne | Paramètres de la commande (inclut la valeur de 'channel')
+| text | string | Texte (par exemple message utilisateur)
+| pos_text | string | L'index du texte dans le message ("-1" si le texte n'a pas été trouvé)
|===
Lorsque la donnée est un pointeur, la variable `tg_signal_data` peut être
diff --git a/doc/it/autogen/plugin_api/infos_hashtable.asciidoc b/doc/it/autogen/plugin_api/infos_hashtable.asciidoc
index 54ccb8408..02cc07e31 100644
--- a/doc/it/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/it/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| Plugin | Nome | Descrizione | Tabella hash (input) | Tabella hash (output)
-| irc | irc_message_parse | controlla un messaggio IRC | "message": messaggio IRC, "server": nome server (opzionale) | "tags": tag, "message_without_tags": messaggio senza tag, "nick": nick, "host": nome host, "command": comando, "channel": canale, "arguments": argomenti (include il canale)
+| irc | irc_message_parse | controlla un messaggio IRC | "message": messaggio IRC, "server": nome server (opzionale) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
| irc | irc_message_split | divide un messaggio IRC (per adattarlo in 512 byte) | "message": messaggio IRC, "server": nome server (opzionale) | "msg1" ... "msgN": messaggio da inviare (senza "\r\n" finale), "args1" ... "argsN": argomenti dei messaggi, "count": numero di messaggi
diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc
index 25b34f5f7..9cbac6eca 100644
--- a/doc/it/weechat_plugin_api.it.asciidoc
+++ b/doc/it/weechat_plugin_api.it.asciidoc
@@ -13304,23 +13304,34 @@ hashtable_in = weechat_hashtable_new (8,
NULL);
if (hashtable_in)
{
- weechat_hashtable_set (hashtable_in, "message",
- ":nick!user@host PRIVMSG #weechat :message here");
+ weechat_hashtable_set (
+ hashtable_in,
+ "message",
+ "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!");
hashtable_out = weechat_info_get_hashtable ("irc_message_parse",
hashtable_in);
/*
* now hashtable_out has following keys/values:
- * "nick" : "nick"
- * "host" : "nick!user@host"
- * "command" : "PRIVMSG"
- * "channel" : "#weechat"
- * "arguments": "#weechat :message here"
+ * "tags" : "time=2015-06-27T16:40:35.000Z"
+ * "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!"
+ * "nick" : "nick"
+ * "host" : "nick!user@host"
+ * "command" : "PRIVMSG"
+ * "channel" : "#weechat"
+ * "arguments" : "#weechat :hello!"
+ * "text" : "hello!"
+ * "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
weechat_hashtable_free (hashtable_out);
}
----
+// TRANSLATION MISSING
+[NOTE]
+See the 'WeeChat Scripting Guide' for more info about "irc_message_parse"
+output.
+
Script (Python):
[source,python]
diff --git a/doc/it/weechat_scripting.it.asciidoc b/doc/it/weechat_scripting.it.asciidoc
index 2084fddf5..527543129 100644
--- a/doc/it/weechat_scripting.it.asciidoc
+++ b/doc/it/weechat_scripting.it.asciidoc
@@ -927,14 +927,69 @@ _Novità nella versione 0.3.4._
È possibile verificare un messaggio irc con una info_hashtable chiamata
"irc_message_parse".
+// TRANSLATION MISSING
+The result is a hashtable with following keys
+(the example values are built with this message:
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Key | WeeChat version | Description | Example
+
+| tags | ≥ 0.4.0 |
+ The tags in message (can be empty) |
+ `time=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!`
+
+| nick | ≥ 0.3.4 |
+ The origin nick |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ The origin host (includes the nick) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ The command ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ The target channel |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ The command arguments (includes the channel) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ The text (for example user message) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ The index of text in message ("-1" if text was not found) |
+ `65`
+|===
+
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message here"})
-weechat.prnt("", "dict: %s" % dict)
-
-# output:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/it/weechat_user.it.asciidoc b/doc/it/weechat_user.it.asciidoc
index 4aefefc63..48d2b052e 100644
--- a/doc/it/weechat_user.it.asciidoc
+++ b/doc/it/weechat_user.it.asciidoc
@@ -3397,6 +3397,8 @@ is added in hashtable:
| command | string | IRC command (example: "PRIVMSG", "NOTICE", ...)
| channel | string | IRC channel
| arguments | string | Arguments of command (includes value of 'channel')
+| text | string | Text (for example user message)
+| pos_text | string | The index of text in message ("-1" if text was not found)
|===
When the data is a pointer, the variable `tg_signal_data` can be used like this
diff --git a/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc b/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc
index b60a5c304..189070678 100644
--- a/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/ja/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| プラグイン | 名前 | 説明 | ハッシュテーブル (入力) | ハッシュテーブル (出力)
-| irc | irc_message_parse | IRC メッセージを解析 | "message": IRC メッセージ、"server": サーバ名 (任意) | "tags": タグ、"message_without_tags": タグを含まないメッセージ、"nick": ニックネーム、"host": ホスト名、"command": コマンド、"channel": チャンネル、"arguments": 引数 (チャンネルを含む)
+| irc | irc_message_parse | IRC メッセージを解析 | "message": IRC メッセージ、"server": サーバ名 (任意) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
| irc | irc_message_split | IRC メッセージを分割 (512 バイトに収める) | "message": IRC メッセージ、"server": サーバ名 (任意) | "msg1" ... "msgN": 送信メッセージ (最後の "\r\n" は無し), "args1" ... "argsN": メッセージの引数、"count": メッセージの数
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index 4a943113d..091018eba 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -12901,23 +12901,34 @@ hashtable_in = weechat_hashtable_new (8,
NULL);
if (hashtable_in)
{
- weechat_hashtable_set (hashtable_in, "message",
- ":nick!user@host PRIVMSG #weechat :message here");
+ weechat_hashtable_set (
+ hashtable_in,
+ "message",
+ "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!");
hashtable_out = weechat_info_get_hashtable ("irc_message_parse",
hashtable_in);
/*
* now hashtable_out has following keys/values:
- * "nick" : "nick"
- * "host" : "nick!user@host"
- * "command" : "PRIVMSG"
- * "channel" : "#weechat"
- * "arguments": "#weechat :message here"
+ * "tags" : "time=2015-06-27T16:40:35.000Z"
+ * "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!"
+ * "nick" : "nick"
+ * "host" : "nick!user@host"
+ * "command" : "PRIVMSG"
+ * "channel" : "#weechat"
+ * "arguments" : "#weechat :hello!"
+ * "text" : "hello!"
+ * "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
weechat_hashtable_free (hashtable_out);
}
----
+// TRANSLATION MISSING
+[NOTE]
+See the 'WeeChat Scripting Guide' for more info about "irc_message_parse"
+output.
+
スクリプト (Python) での使用例:
[source,python]
diff --git a/doc/ja/weechat_scripting.ja.asciidoc b/doc/ja/weechat_scripting.ja.asciidoc
index 9db3410ac..8ec667104 100644
--- a/doc/ja/weechat_scripting.ja.asciidoc
+++ b/doc/ja/weechat_scripting.ja.asciidoc
@@ -902,14 +902,69 @@ _バージョン 0.3.4 の新機能_
"irc_message_parse" と呼ばれる info_hashtable を使って IRC メッセージを構文解析できます。
+// TRANSLATION MISSING
+The result is a hashtable with following keys
+(the example values are built with this message:
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Key | WeeChat version | Description | Example
+
+| tags | ≥ 0.4.0 |
+ The tags in message (can be empty) |
+ `time=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!`
+
+| nick | ≥ 0.3.4 |
+ The origin nick |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ The origin host (includes the nick) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ The command ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ The target channel |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ The command arguments (includes the channel) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ The text (for example user message) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ The index of text in message ("-1" if text was not found) |
+ `65`
+|===
+
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message here"})
-weechat.prnt("", "dict: %s" % dict)
-
-# 出力:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/ja/weechat_user.ja.asciidoc b/doc/ja/weechat_user.ja.asciidoc
index e49aa6d4a..8d309ec0d 100644
--- a/doc/ja/weechat_user.ja.asciidoc
+++ b/doc/ja/weechat_user.ja.asciidoc
@@ -3235,6 +3235,10 @@ ${tg_highlight} || ${tg_msg_pv}
| command | string | IRC コマンド (例: "PRIVMSG"、"NOTICE"、...)
| channel | string | IRC チャンネル
| arguments | string | コマンドの引数 ('channel' の値を含みます)
+// TRANSLATION MISSING
+| text | string | Text (for example user message)
+// TRANSLATION MISSING
+| pos_text | string | The index of text in message ("-1" if text was not found)
|===
// TRANSLATION MISSING
diff --git a/doc/pl/autogen/plugin_api/infos_hashtable.asciidoc b/doc/pl/autogen/plugin_api/infos_hashtable.asciidoc
index 76185e81d..bd2e73944 100644
--- a/doc/pl/autogen/plugin_api/infos_hashtable.asciidoc
+++ b/doc/pl/autogen/plugin_api/infos_hashtable.asciidoc
@@ -6,7 +6,7 @@
|===
| Wtyczka | Nazwa | Opis | Hashtable (wejście) | Hashtable (wyjście)
-| irc | irc_message_parse | przetwarza wiadomość IRC | "message": wiadomość IRC, "server": nazwa serwera (opcjonalne) | "tags": tagi, "message_without_tags": wiadomość bez tagów, "nick": nick, "host": host, "command": komenda, "channel": kanał, "arguments": argumenty (razem z kanałem)
+| irc | irc_message_parse | przetwarza wiadomość IRC | "message": wiadomość IRC, "server": nazwa serwera (opcjonalne) | "tags": tags, "message_without_tags": message without the tags, "nick": nick, "host": host, "command": command, "channel": channel, "arguments": arguments (includes channel), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
| irc | irc_message_split | dziel wiadomość IRC (aby zmieściła się w 512 bajtach) | "message": wiadomość IRC, "server": nazwa serwera (opcjonalne) | "msg1" ... "msgN": wiadomości do wysłania (bez kończącego "\r\n"), "args1" ... "argsN": argumenty wiadomości, "count": ilość wiadomości
diff --git a/doc/pl/weechat_scripting.pl.asciidoc b/doc/pl/weechat_scripting.pl.asciidoc
index 2414af300..e98461282 100644
--- a/doc/pl/weechat_scripting.pl.asciidoc
+++ b/doc/pl/weechat_scripting.pl.asciidoc
@@ -900,16 +900,72 @@ Zniekształcone wiadomości mogą uszkodzić WeeChat, lub spowodować wiele prob
_Nowe w wersji 0.3.4._
-Można przetwarzać wiadomości IRC za pomocą info_hashtable zwanej "irc_message_parse".
+Można przetwarzać wiadomości IRC za pomocą info_hashtable zwanej
+"irc_message_parse".
+
+// TRANSLATION MISSING
+The result is a hashtable with following keys
+(the example values are built with this message:
+`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+
+[width="100%",cols="1,^2,10,8",options="header"]
+|===
+| Key | WeeChat version | Description | Example
+
+| tags | ≥ 0.4.0 |
+ The tags in message (can be empty) |
+ `time=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!`
+
+| nick | ≥ 0.3.4 |
+ The origin nick |
+ `nick`
+
+| host | ≥ 0.3.4 |
+ The origin host (includes the nick) |
+ `nick!user@host`
+
+| command | ≥ 0.3.4 |
+ The command ('PRIVMSG', 'NOTICE', ...) |
+ `PRIVMSG`
+
+| channel | ≥ 0.3.4 |
+ The target channel |
+ `#weechat`
+
+| arguments | ≥ 0.3.4 |
+ The command arguments (includes the channel) |
+ `#weechat :hello!`
+
+| text | ≥ 1.3 |
+ The text (for example user message) |
+ `hello!`
+
+| pos_text | ≥ 1.3 |
+ The index of text in message ("-1" if text was not found) |
+ `65`
+|===
[source,python]
----
-dict = weechat.info_get_hashtable("irc_message_parse",
- {"message": ":nick!user@host PRIVMSG #weechat :message here"})
-weechat.prnt("", "dict: %s" % dict)
-
-# wyjście:
-# dict: {'nick': 'nick', 'host': 'nick!user@host', 'command': 'PRIVMSG', 'arguments': '#weechat :message here', 'channel': '#weechat'}
+dict = weechat.info_get_hashtable(
+ "irc_message_parse",
+ {"message": "@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!"})
+
+# dict == {
+# "tags": "time=2015-06-27T16:40:35.000Z",
+# "message_without_tags": ":nick!user@host PRIVMSG #weechat :hello!",
+# "nick": "nick",
+# "host": "nick!user@host",
+# "command": "PRIVMSG",
+# "channel": "#weechat",
+# "arguments": "#weechat :hello!",
+# "text": "hello!",
+# "pos_text": "65",
+# }
----
[[infos]]
diff --git a/doc/pl/weechat_user.pl.asciidoc b/doc/pl/weechat_user.pl.asciidoc
index 391ff6c92..914db2898 100644
--- a/doc/pl/weechat_user.pl.asciidoc
+++ b/doc/pl/weechat_user.pl.asciidoc
@@ -3265,6 +3265,10 @@ są dodawane do tablicy hashy:
| command | ciąg | Komendy IRC (na przykład: "PRIVMSG", "NOTICE", ...)
| channel | ciąg | Kanał IRC
| arguments | ciąg | Argumenty komendy (razem z wartością 'channel')
+// TRANSLATION MISSING
+| text | ciąg | Text (for example user message)
+// TRANSLATION MISSING
+| pos_text | ciąg | The index of text in message ("-1" if text was not found)
|===
// TRANSLATION MISSING