summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc1
-rw-r--r--doc/de/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/de/autogen/user/irc_options.asciidoc5
-rw-r--r--doc/de/weechat_scripting.de.asciidoc21
-rw-r--r--doc/de/weechat_user.de.asciidoc9
-rw-r--r--doc/en/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/en/autogen/user/irc_options.asciidoc5
-rw-r--r--doc/en/weechat_plugin_api.en.asciidoc3
-rw-r--r--doc/en/weechat_scripting.en.asciidoc17
-rw-r--r--doc/en/weechat_user.en.asciidoc5
-rw-r--r--doc/fr/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/fr/autogen/user/irc_options.asciidoc5
-rw-r--r--doc/fr/weechat_plugin_api.fr.asciidoc3
-rw-r--r--doc/fr/weechat_scripting.fr.asciidoc17
-rw-r--r--doc/fr/weechat_user.fr.asciidoc7
-rw-r--r--doc/it/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/it/autogen/user/irc_options.asciidoc5
-rw-r--r--doc/it/weechat_plugin_api.it.asciidoc3
-rw-r--r--doc/it/weechat_scripting.it.asciidoc17
-rw-r--r--doc/it/weechat_user.it.asciidoc9
-rw-r--r--doc/ja/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/ja/autogen/user/irc_options.asciidoc5
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc3
-rw-r--r--doc/ja/weechat_scripting.ja.asciidoc30
-rw-r--r--doc/ja/weechat_user.ja.asciidoc9
-rw-r--r--doc/pl/autogen/plugin_api/infos_hashtable.asciidoc2
-rw-r--r--doc/pl/autogen/user/irc_options.asciidoc5
-rw-r--r--doc/pl/weechat_scripting.pl.asciidoc17
-rw-r--r--doc/pl/weechat_user.pl.asciidoc9
-rw-r--r--po/cs.po16
-rw-r--r--po/de.po17
-rw-r--r--po/es.po16
-rw-r--r--po/fr.po31
-rw-r--r--po/hu.po16
-rw-r--r--po/it.po16
-rw-r--r--po/ja.po17
-rw-r--r--po/pl.po32
-rw-r--r--po/pt_BR.po16
-rw-r--r--po/ru.po16
-rw-r--r--po/tr.po16
-rw-r--r--po/weechat.pot16
-rw-r--r--src/plugins/irc/irc-config.c10
-rw-r--r--src/plugins/irc/irc-config.h1
-rw-r--r--src/plugins/irc/irc-info.c21
-rw-r--r--src/plugins/irc/irc-message.c53
-rw-r--r--src/plugins/irc/irc-message.h3
-rw-r--r--src/plugins/irc/irc-notify.c5
-rw-r--r--src/plugins/irc/irc-server.c32
48 files changed, 483 insertions, 89 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 824e96ab2..af95155c6 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -34,6 +34,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
* api: add function string_eval_path_home()
* alias: add options "add", "addcompletion" and "del" in command /alias, remove
command /unalias (issue #458)
+* irc: add option irc.network.channel_encode (issue #218, issue #482)
* irc: add option irc.color.topic_current (issue #475)
* irc: evaluate content of server option "nicks"
* logger: evaluate content of option logger.file.path (issue #388)
diff --git a/doc/de/autogen/plugin_api/infos_hashtable.asciidoc b/doc/de/autogen/plugin_api/infos_hashtable.asciidoc
index d3747f0cb..5824dba3f 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), "text": Text (zum Beispiel eine Nachricht von einem User), "pos_text": Index des Textes innerhalb einer Nachricht ("-1" falls Text nicht gefunden wird)
+| 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_command": index of "command" message ("-1" if "command" was not found), "pos_arguments": index of "arguments" message ("-1" if "arguments" was not found), "pos_channel": index of "channel" message ("-1" if "channel" was not found), "pos_text": index of "text" message ("-1" if "text" was not 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/autogen/user/irc_options.asciidoc b/doc/de/autogen/user/irc_options.asciidoc
index 3eb879948..b4e6a0df4 100644
--- a/doc/de/autogen/user/irc_options.asciidoc
+++ b/doc/de/autogen/user/irc_options.asciidoc
@@ -392,6 +392,11 @@
** Typ: Zeichenkette
** Werte: beliebige Zeichenkette (Standardwert: `"*!$ident@$host"`)
+* [[option_irc.network.channel_encode]] *irc.network.channel_encode*
+** Beschreibung: `decode/encode channel name inside messages using charset options (like it was done in WeeChat <= 1.2); it is recommended to keep that off if you use only UTF-8 in channel names; you can enable this option if you are using an exotic charset like ISO in channel names`
+** Typ: boolesch
+** Werte: on, off (Standardwert: `off`)
+
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** Beschreibung: `wenn deaktiviert, werden Farben-Codes von eingehenden Nachrichten ignoriert`
** Typ: boolesch
diff --git a/doc/de/weechat_scripting.de.asciidoc b/doc/de/weechat_scripting.de.asciidoc
index 194254442..ce4a7eaca 100644
--- a/doc/de/weechat_scripting.de.asciidoc
+++ b/doc/de/weechat_scripting.de.asciidoc
@@ -961,8 +961,24 @@ Das Ergebnis ist eine Hashtabelle mit folgenden Schlüsseln
der Text (zum Beispiel eine Nachricht eines Users) |
`hello!`
+// TRANSLATION MISSING
+| pos_command | ≥ 1.3 |
+ The index of 'command' in message ("-1" if 'command' was not found) |
+ `47`
+
+// TRANSLATION MISSING
+| pos_arguments | ≥ 1.3 |
+ The index of 'arguments' in message ("-1" if 'arguments' was not found) |
+ `55`
+
+// TRANSLATION MISSING
+| pos_channel | ≥ 1.3 |
+ The index of 'channel' in message ("-1" if 'channel' was not found) |
+ `55`
+
+// TRANSLATION MISSING
| pos_text | ≥ 1.3 |
- der Index des Textes innerhalb der Nachricht ("-1" falls der Text nicht gefunden wurde) |
+ The index of 'text' in message ("-1" if 'text' was not found) |
`65`
|===
@@ -981,6 +997,9 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
+# "pos_command": "47",
+# "pos_arguments": "55",
+# "pos_channel": "55",
# "pos_text": "65",
# }
----
diff --git a/doc/de/weechat_user.de.asciidoc b/doc/de/weechat_user.de.asciidoc
index ebe2c6ab2..3ccd5232f 100644
--- a/doc/de/weechat_user.de.asciidoc
+++ b/doc/de/weechat_user.de.asciidoc
@@ -3323,7 +3323,14 @@ und die Daten in einer Hashtable gesichert:
| channel | string | IRC Channel
| arguments | string | Argumente des Befehls (Beinhaltet Wert von 'channel')
| text | string | Text (zum Beipiel eine Nachricht eines Users)
-| pos_text | string | Der Index des Textes in einer Nachricht ("-1" falls Text nicht gefunden wurde)
+// TRANSLATION MISSING
+| pos_command | string | The index of 'command' in message ("-1" if 'command' was not found)
+// TRANSLATION MISSING
+| pos_arguments | string | The index of 'arguments' in message ("-1" if 'arguments' was not found)
+// TRANSLATION MISSING
+| pos_channel | string | The index of 'channel' in message ("-1" if 'channel' was not found)
+// TRANSLATION MISSING
+| pos_text | string | The index of 'text' in message ("-1" if 'text' was not found)
|===
Sofern es sich bei den Daten um einen Pointer handelt, kann die Variable `tg_signal_data`
diff --git a/doc/en/autogen/plugin_api/infos_hashtable.asciidoc b/doc/en/autogen/plugin_api/infos_hashtable.asciidoc
index 8987746c6..d77499995 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), "text": text (for example user message), "pos_text": index of text in message ("-1" if no text found)
+| 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_command": index of "command" message ("-1" if "command" was not found), "pos_arguments": index of "arguments" message ("-1" if "arguments" was not found), "pos_channel": index of "channel" message ("-1" if "channel" was not found), "pos_text": index of "text" message ("-1" if "text" was not 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/autogen/user/irc_options.asciidoc b/doc/en/autogen/user/irc_options.asciidoc
index b175c8bc7..7c780fd8b 100644
--- a/doc/en/autogen/user/irc_options.asciidoc
+++ b/doc/en/autogen/user/irc_options.asciidoc
@@ -392,6 +392,11 @@
** type: string
** values: any string (default value: `"*!$ident@$host"`)
+* [[option_irc.network.channel_encode]] *irc.network.channel_encode*
+** description: `decode/encode channel name inside messages using charset options (like it was done in WeeChat <= 1.2); it is recommended to keep that off if you use only UTF-8 in channel names; you can enable this option if you are using an exotic charset like ISO in channel names`
+** type: boolean
+** values: on, off (default value: `off`)
+
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** description: `when off, colors codes are ignored in incoming messages`
** type: boolean
diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc
index 222153ffd..13fabe3df 100644
--- a/doc/en/weechat_plugin_api.en.asciidoc
+++ b/doc/en/weechat_plugin_api.en.asciidoc
@@ -12956,6 +12956,9 @@ if (hashtable_in)
* "channel" : "#weechat"
* "arguments" : "#weechat :hello!"
* "text" : "hello!"
+ * "pos_command" : "47"
+ * "pos_arguments" : "55"
+ * "pos_channel" : "55"
* "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
diff --git a/doc/en/weechat_scripting.en.asciidoc b/doc/en/weechat_scripting.en.asciidoc
index 3fc5e5f12..631027b4e 100644
--- a/doc/en/weechat_scripting.en.asciidoc
+++ b/doc/en/weechat_scripting.en.asciidoc
@@ -939,8 +939,20 @@ The result is a hashtable with following keys
The text (for example user message) |
`hello!`
+| pos_command | ≥ 1.3 |
+ The index of 'command' in message ("-1" if 'command' was not found) |
+ `47`
+
+| pos_arguments | ≥ 1.3 |
+ The index of 'arguments' in message ("-1" if 'arguments' was not found) |
+ `55`
+
+| pos_channel | ≥ 1.3 |
+ The index of 'channel' in message ("-1" if 'channel' was not found) |
+ `55`
+
| pos_text | ≥ 1.3 |
- The index of text in message ("-1" if text was not found) |
+ The index of 'text' in message ("-1" if 'text' was not found) |
`65`
|===
@@ -959,6 +971,9 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
+# "pos_command": "47",
+# "pos_arguments": "55",
+# "pos_channel": "55",
# "pos_text": "65",
# }
----
diff --git a/doc/en/weechat_user.en.asciidoc b/doc/en/weechat_user.en.asciidoc
index d2fc9f32d..97faa12bf 100644
--- a/doc/en/weechat_user.en.asciidoc
+++ b/doc/en/weechat_user.en.asciidoc
@@ -3239,7 +3239,10 @@ is added in hashtable:
| 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)
+| pos_command | string | The index of 'command' in message ("-1" if 'command' was not found)
+| pos_arguments | string | The index of 'arguments' in message ("-1" if 'arguments' was not found)
+| pos_channel | string | The index of 'channel' in message ("-1" if 'channel' was not found)
+| 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 7d84565b5..32314fcaf 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), "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_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_command" : index de "command" dans le message ("-1" si "command" n'a pas été trouvé), "pos_arguments" : index de "arguments" dans le message ("-1" si "arguments" n'a pas été trouvé), "pos_channel" : index de "channel" dans le message ("-1" si "channel" n'a pas été trouvé), "pos_text" : index de "text" dans le message ("-1" si "text" n'a pas é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/autogen/user/irc_options.asciidoc b/doc/fr/autogen/user/irc_options.asciidoc
index a7e0f4d5b..a7442d85e 100644
--- a/doc/fr/autogen/user/irc_options.asciidoc
+++ b/doc/fr/autogen/user/irc_options.asciidoc
@@ -392,6 +392,11 @@
** type: chaîne
** valeurs: toute chaîne (valeur par défaut: `"*!$ident@$host"`)
+* [[option_irc.network.channel_encode]] *irc.network.channel_encode*
+** description: `décoder/encoder le nom du canal dans les messages en utilisant les options de charset (comme cela était fait dans WeeChat <= 1.2) ; il est recommandé de garder cette option désactivée si vous utilisez seulement UTF-8 dans les noms de canaux ; vous pouvez activer cette option si vous utilisez un charset exotique comme ISO dans les noms de canaux`
+** type: booléen
+** valeurs: on, off (valeur par défaut: `off`)
+
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** description: `si désactivé, les codes couleurs des messages entrants sont ignorés`
** type: booléen
diff --git a/doc/fr/weechat_plugin_api.fr.asciidoc b/doc/fr/weechat_plugin_api.fr.asciidoc
index d24c4f53e..56adc832a 100644
--- a/doc/fr/weechat_plugin_api.fr.asciidoc
+++ b/doc/fr/weechat_plugin_api.fr.asciidoc
@@ -13209,6 +13209,9 @@ if (hashtable_in)
* "channel" : "#weechat"
* "arguments" : "#weechat :hello!"
* "text" : "hello!"
+ * "pos_command" : "47"
+ * "pos_arguments" : "55"
+ * "pos_channel" : "55"
* "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
diff --git a/doc/fr/weechat_scripting.fr.asciidoc b/doc/fr/weechat_scripting.fr.asciidoc
index bcbd659f6..e0724eec4 100644
--- a/doc/fr/weechat_scripting.fr.asciidoc
+++ b/doc/fr/weechat_scripting.fr.asciidoc
@@ -963,8 +963,20 @@ Le résultat est une table de hachage avec les clés suivantes
Le texte (par exemple un message utilisateur) |
`hello!`
+| pos_command | ≥ 1.3 |
+ La position de 'command' dans le message ("-1" si 'command' n'a pas été trouvé) |
+ `47`
+
+| pos_arguments | ≥ 1.3 |
+ La position de 'arguments' dans le message ("-1" si 'arguments' n'a pas été trouvé) |
+ `55`
+
+| pos_channel | ≥ 1.3 |
+ La position de 'channel' dans le message ("-1" si 'channel' n'a pas été trouvé) |
+ `55`
+
| pos_text | ≥ 1.3 |
- La position du texte dans le message ("-1" si le texte n'a pas été trouvé) |
+ La position de 'text' dans le message ("-1" si 'text' n'a pas été trouvé) |
`65`
|===
@@ -983,6 +995,9 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
+# "pos_command": "47",
+# "pos_arguments": "55",
+# "pos_channel": "55",
# "pos_text": "65",
# }
----
diff --git a/doc/fr/weechat_user.fr.asciidoc b/doc/fr/weechat_user.fr.asciidoc
index 0b902589a..efbbef5cb 100644
--- a/doc/fr/weechat_user.fr.asciidoc
+++ b/doc/fr/weechat_user.fr.asciidoc
@@ -3341,8 +3341,11 @@ 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é)
+| text | chaîne | Texte (par exemple message utilisateur)
+| pos_command | chaîne | L'index de 'command' dans le message ("-1" si 'command' n'a pas été trouvé)
+| pos_arguments | chaîne | L'index de 'arguments' dans le message ("-1" si 'arguments' n'a pas été trouvé)
+| pos_channel | chaîne | L'index de 'channel' dans le message ("-1" si 'channel' n'a pas été trouvé)
+| pos_text | chaîne | L'index de 'text' dans le message ("-1" si 'text' 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 02cc07e31..66b77d61a 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": 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_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_command": index of "command" message ("-1" if "command" was not found), "pos_arguments": index of "arguments" message ("-1" if "arguments" was not found), "pos_channel": index of "channel" message ("-1" if "channel" was not found), "pos_text": index of "text" message ("-1" if "text" was not 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/autogen/user/irc_options.asciidoc b/doc/it/autogen/user/irc_options.asciidoc
index af2d8a9a5..54c051afe 100644
--- a/doc/it/autogen/user/irc_options.asciidoc
+++ b/doc/it/autogen/user/irc_options.asciidoc
@@ -392,6 +392,11 @@
** tipo: stringa
** valori: qualsiasi stringa (valore predefinito: `"*!$ident@$host"`)
+* [[option_irc.network.channel_encode]] *irc.network.channel_encode*
+** descrizione: `decode/encode channel name inside messages using charset options (like it was done in WeeChat <= 1.2); it is recommended to keep that off if you use only UTF-8 in channel names; you can enable this option if you are using an exotic charset like ISO in channel names`
+** tipo: bool
+** valori: on, off (valore predefinito: `off`)
+
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** descrizione: `se disabilitato, i codici colori vengono ignorati nei messaggi in entrata`
** tipo: bool
diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc
index e14081dbb..f842725e6 100644
--- a/doc/it/weechat_plugin_api.it.asciidoc
+++ b/doc/it/weechat_plugin_api.it.asciidoc
@@ -13373,6 +13373,9 @@ if (hashtable_in)
* "channel" : "#weechat"
* "arguments" : "#weechat :hello!"
* "text" : "hello!"
+ * "pos_command" : "47"
+ * "pos_arguments" : "55"
+ * "pos_channel" : "55"
* "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
diff --git a/doc/it/weechat_scripting.it.asciidoc b/doc/it/weechat_scripting.it.asciidoc
index 527543129..0bb036d1b 100644
--- a/doc/it/weechat_scripting.it.asciidoc
+++ b/doc/it/weechat_scripting.it.asciidoc
@@ -968,8 +968,20 @@ The result is a hashtable with following keys
The text (for example user message) |
`hello!`
+| pos_command | ≥ 1.3 |
+ The index of 'command' in message ("-1" if 'command' was not found) |
+ `47`
+
+| pos_arguments | ≥ 1.3 |
+ The index of 'arguments' in message ("-1" if 'arguments' was not found) |
+ `55`
+
+| pos_channel | ≥ 1.3 |
+ The index of 'channel' in message ("-1" if 'channel' was not found) |
+ `55`
+
| pos_text | ≥ 1.3 |
- The index of text in message ("-1" if text was not found) |
+ The index of 'text' in message ("-1" if 'text' was not found) |
`65`
|===
@@ -988,6 +1000,9 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
+# "pos_command": "47",
+# "pos_arguments": "55",
+# "pos_channel": "55",
# "pos_text": "65",
# }
----
diff --git a/doc/it/weechat_user.it.asciidoc b/doc/it/weechat_user.it.asciidoc
index 78e95c8f4..7ecb43ef1 100644
--- a/doc/it/weechat_user.it.asciidoc
+++ b/doc/it/weechat_user.it.asciidoc
@@ -3403,7 +3403,14 @@ is added in hashtable:
| 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)
+// TRANSLATION MISSING
+| pos_command | string | The index of 'command' in message ("-1" if 'command' was not found)
+// TRANSLATION MISSING
+| pos_arguments | string | The index of 'arguments' in message ("-1" if 'arguments' was not found)
+// TRANSLATION MISSING
+| pos_channel | string | The index of 'channel' in message ("-1" if 'channel' was not found)
+// TRANSLATION MISSING
+| 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 cb7dafe9b..abf8dabb0 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": 引数 (チャンネルを含む)、"text": テキスト (例えばユーザメッセージ)、"pos_text": メッセージ内テキストの位置 (テキストが見つからなかった場合 "-1")
+| 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_command": index of "command" message ("-1" if "command" was not found), "pos_arguments": index of "arguments" message ("-1" if "arguments" was not found), "pos_channel": index of "channel" message ("-1" if "channel" was not found), "pos_text": index of "text" message ("-1" if "text" was not found)
| irc | irc_message_split | IRC メッセージを分割 (512 バイトに収める) | "message": IRC メッセージ、"server": サーバ名 (任意) | "msg1" ... "msgN": 送信メッセージ (最後の "\r\n" は無し), "args1" ... "argsN": メッセージの引数、"count": メッセージの数
diff --git a/doc/ja/autogen/user/irc_options.asciidoc b/doc/ja/autogen/user/irc_options.asciidoc
index ef2dfeed6..35b35feef 100644
--- a/doc/ja/autogen/user/irc_options.asciidoc
+++ b/doc/ja/autogen/user/irc_options.asciidoc
@@ -392,6 +392,11 @@
** タイプ: 文字列
** 値: 未制約文字列 (デフォルト値: `"*!$ident@$host"`)
+* [[option_irc.network.channel_encode]] *irc.network.channel_encode*
+** 説明: `decode/encode channel name inside messages using charset options (like it was done in WeeChat <= 1.2); it is recommended to keep that off if you use only UTF-8 in channel names; you can enable this option if you are using an exotic charset like ISO in channel names`
+** タイプ: ブール
+** 値: on, off (デフォルト値: `off`)
+
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** 説明: `オフの場合、到着メッセージに含まれる色コードを無視`
** タイプ: ブール
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index c6b6a011e..5aad67915 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -12952,6 +12952,9 @@ if (hashtable_in)
* "channel" : "#weechat"
* "arguments" : "#weechat :hello!"
* "text" : "hello!"
+ * "pos_command" : "47"
+ * "pos_arguments" : "55"
+ * "pos_channel" : "55"
* "pos_text" : "65"
*/
weechat_hashtable_free (hashtable_in);
diff --git a/doc/ja/weechat_scripting.ja.asciidoc b/doc/ja/weechat_scripting.ja.asciidoc
index bc37c471e..8b89f5328 100644
--- a/doc/ja/weechat_scripting.ja.asciidoc
+++ b/doc/ja/weechat_scripting.ja.asciidoc
@@ -906,44 +906,69 @@ _バージョン 0.3.4 の新機能_
(例の値は以下のメッセージから作られました:
`@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!`):
+// TRANSLATION MISSING
[width="100%",cols="1,^2,10,8",options="header"]
|===
| Key | WeeChat version | Description | Example
+// TRANSLATION MISSING
| tags | ≥ 0.4.0 |
The tags in message (can be empty) |
`time=2015-06-27T16:40:35.000Z`
+// TRANSLATION MISSING
| 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!`
+// TRANSLATION MISSING
| nick | ≥ 0.3.4 |
The origin nick |
`nick`
+// TRANSLATION MISSING
| host | ≥ 0.3.4 |
The origin host (includes the nick) |
`nick!user@host`
+// TRANSLATION MISSING
| command | ≥ 0.3.4 |
The command ('PRIVMSG', 'NOTICE', ...) |
`PRIVMSG`
+// TRANSLATION MISSING
| channel | ≥ 0.3.4 |
The target channel |
`#weechat`
+// TRANSLATION MISSING
| arguments | ≥ 0.3.4 |
The command arguments (includes the channel) |
`#weechat :hello!`
+// TRANSLATION MISSING
| text | ≥ 1.3 |
The text (for example user message) |
`hello!`
+// TRANSLATION MISSING
+| pos_command | ≥ 1.3 |
+ The index of 'command' in message ("-1" if 'command' was not found) |
+ `47`
+
+// TRANSLATION MISSING
+| pos_arguments | ≥ 1.3 |
+ The index of 'arguments' in message ("-1" if 'arguments' was not found) |
+ `55`
+
+// TRANSLATION MISSING
+| pos_channel | ≥ 1.3 |
+ The index of 'channel' in message ("-1" if 'channel' was not found) |
+ `55`
+
+// TRANSLATION MISSING
| pos_text | ≥ 1.3 |
- The index of text in message ("-1" if text was not found) |
+ The index of 'text' in message ("-1" if 'text' was not found) |
`65`
|===
@@ -962,6 +987,9 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
+# "pos_command": "47",
+# "pos_arguments": "55",
+# "pos_channel": "55",
# "pos_text": "65",
# }
----
diff --git a/doc/ja/weechat_user.ja.asciidoc b/doc/ja/weechat_user.ja.asciidoc
index 605e29cd2..3fcb17ae3 100644
--- a/doc/ja/weechat_user.ja.asciidoc
+++ b/doc/ja/weechat_user.ja.asciidoc
@@ -3238,7 +3238,14 @@ ${tg_highlight} || ${tg_msg_pv}
| channel | string | IRC チャンネル
| arguments | string | コマンドの引数 ('channel' の値を含みます)
| text | string | テキスト (例えばユーザメッセージ)
-| pos_text | string | メッセージ内のテキストの位置 (テキストが見つからない場合 "-1")
+// TRANSLATION MISSING
+| pos_command | string | The index of 'command' in message ("-1" if 'command' was not found)
+// TRANSLATION MISSING
+| pos_arguments | string | The index of 'arguments' in message ("-1" if 'arguments' was not found)
+// TRANSLATION MISSING
+| pos_channel | string | The index of 'channel' in message ("-1" if 'channel' was not found)
+// TRANSLATION MISSING
+| pos_text | string | The index of 'text' in message ("-1" if 'text' was not found)
|===
データがポインタの場合、hdata の属性を読むために変数 `tg_signal_data`
diff --git a/doc/pl/autogen/plugin_api/infos_hashtable.asciidoc b/doc/pl/autogen/plugin_api/infos_hashtable.asciidoc
index 99b418325..2e0442c8e 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), "text": tekst (na przykład wiadomość użytkownika), "pos_text": indeks wiadomości tekstowej ("-1" jeśli wiadomość nie została znaleziona)
+| 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_command": index of "command" message ("-1" if "command" was not found), "pos_arguments": index of "arguments" message ("-1" if "arguments" was not found), "pos_channel": index of "channel" message ("-1" if "channel" was not found), "pos_text": index of "text" message ("-1" if "text" was not 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/autogen/user/irc_options.asciidoc b/doc/pl/autogen/user/irc_options.asciidoc
index 1a81cccc5..881dcce71 100644
--- a/doc/pl/autogen/user/irc_options.asciidoc
+++ b/doc/pl/autogen/user/irc_options.asciidoc
@@ -392,6 +392,11 @@
** typ: ciąg
** wartości: dowolny ciąg (domyślna wartość: `"*!$ident@$host"`)
+* [[option_irc.network.channel_encode]] *irc.network.channel_encode*
+** opis: `decode/encode channel name inside messages using charset options (like it was done in WeeChat <= 1.2); it is recommended to keep that off if you use only UTF-8 in channel names; you can enable this option if you are using an exotic charset like ISO in channel names`
+** typ: bool
+** wartości: on, off (domyślna wartość: `off`)
+
* [[option_irc.network.colors_receive]] *irc.network.colors_receive*
** opis: `kiedy wyłączone (off) kody kolorów są ignorowane w przychodzących wiadomościach`
** typ: bool
diff --git a/doc/pl/weechat_scripting.pl.asciidoc b/doc/pl/weechat_scripting.pl.asciidoc
index 77c7b10f4..ddfa5980b 100644
--- a/doc/pl/weechat_scripting.pl.asciidoc
+++ b/doc/pl/weechat_scripting.pl.asciidoc
@@ -943,8 +943,20 @@ Wynik jest tabela hashy z następującymi kluczami
Tekst (na przykład wiadomość użytkownika) |
`hello!`
+| pos_command | ≥ 1.3 |
+ The index of 'command' in message ("-1" if 'command' was not found) |
+ `47`
+
+| pos_arguments | ≥ 1.3 |
+ The index of 'arguments' in message ("-1" if 'arguments' was not found) |
+ `55`
+
+| pos_channel | ≥ 1.3 |
+ The index of 'channel' in message ("-1" if 'channel' was not found) |
+ `55`
+
| pos_text | ≥ 1.3 |
- Indeks tekstu w wiadomości ("-1" jeśli nie znaleziono tekstu) |
+ The index of 'text' in message ("-1" if 'text' was not found) |
`65`
|===
@@ -963,6 +975,9 @@ dict = weechat.info_get_hashtable(
# "channel": "#weechat",
# "arguments": "#weechat :hello!",
# "text": "hello!",
+# "pos_command": "47",
+# "pos_arguments": "55",
+# "pos_channel": "55",
# "pos_text": "65",
# }
----
diff --git a/doc/pl/weechat_user.pl.asciidoc b/doc/pl/weechat_user.pl.asciidoc
index d581286f0..78449e23b 100644
--- a/doc/pl/weechat_user.pl.asciidoc
+++ b/doc/pl/weechat_user.pl.asciidoc
@@ -3264,7 +3264,14 @@ są dodawane do tablicy hashy:
| channel | ciąg | Kanał IRC
| arguments | ciąg | Argumenty komendy (razem z wartością 'channel')
| text | ciąg | Tekst (na przykład wiadomość użytkownika)
-| pos_text | ciąg | Indeks tekstu w wiadomości ("-1" jeśli tekst nie został znaleziony)
+// TRANSLATION MISSING
+| pos_command | ciąg | The index of 'command' in message ("-1" if 'command' was not found)
+// TRANSLATION MISSING
+| pos_arguments | ciąg | The index of 'arguments' in message ("-1" if 'arguments' was not found)
+// TRANSLATION MISSING
+| pos_channel | ciąg | The index of 'channel' in message ("-1" if 'channel' was not found)
+// TRANSLATION MISSING
+| pos_text | ciąg | The index of 'text' in message ("-1" if 'text' was not found)
|===
Kiedy dane są wskaźnikiem, zmienna `tg_signal_data` może zostać użyta do
diff --git a/po/cs.po b/po/cs.po
index 4479726db..2097f4966 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-08-01 10:23+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7454,6 +7454,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr "pokud je off, jsou barvy v příchozích zprávách ignorovány"
@@ -7609,8 +7616,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"nick\": přezdívka, \"host\": host, \"command\": příkaz, \"channel\": "
"kanál, \"arguments\": argumenty (včetně kanálu)"
diff --git a/po/de.po b/po/de.po
index 2c121a763..70ff757e8 100644
--- a/po/de.po
+++ b/po/de.po
@@ -24,7 +24,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-08-08 10:29+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <>\n"
@@ -8651,6 +8651,13 @@ msgstr ""
"\"~\" beginnt. Andernfalls wird daraus \"*\"; diese Vorgabemaske wird nur "
"angewendet, sofern WeeChat den Host des Nicks ermitteln kann"
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
"wenn deaktiviert, werden Farben-Codes von eingehenden Nachrichten ignoriert"
@@ -8815,12 +8822,16 @@ msgid "\"message\": IRC message, \"server\": server name (optional)"
msgstr "\"message\": IRC Nachricht, \"server\": Servername (optional)"
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
+#, fuzzy
msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"tags\": Tags, \"message_without_tags\": Nachrichten ohne Tags, \"nick\": "
"Nick, \"host\": Host, \"command\": Befehl, \"channel\": Channel, \"arguments"
diff --git a/po/es.po b/po/es.po
index b37f41e2a..2c410b68e 100644
--- a/po/es.po
+++ b/po/es.po
@@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-07-26 09:41+0200\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7738,6 +7738,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
"cuando se desactiva, los códigos de color se ignoran en los mensajes "
@@ -7899,8 +7906,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"tags\": etiquetas, \"message_without_tags\": mensaje sin etiquetas, \"nick"
"\": apodo, \"host\": host, \"command\": comando, \"channel\": canal, "
diff --git a/po/fr.po b/po/fr.po
index 187035d60..57a364578 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
-"PO-Revision-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
+"PO-Revision-Date: 2015-08-14 21:21+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@@ -8432,6 +8432,18 @@ msgstr ""
"masque par défaut est utilisé seulement si WeeChat connaît l'hôte pour le "
"pseudo"
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+"décoder/encoder le nom du canal dans les messages en utilisant les options "
+"de charset (comme cela était fait dans WeeChat <= 1.2) ; il est recommandé "
+"de garder cette option désactivée si vous utilisez seulement UTF-8 dans les "
+"noms de canaux ; vous pouvez activer cette option si vous utilisez un "
+"charset exotique comme ISO dans les noms de canaux"
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr "si désactivé, les codes couleurs des messages entrants sont ignorés"
@@ -8594,14 +8606,21 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"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é)"
+"\"text\" : texte (par exemple message utilisateur), \"pos_command\" : index "
+"de \"command\" dans le message (\"-1\" si \"command\" n'a pas été trouvé), "
+"\"pos_arguments\" : index de \"arguments\" dans le message (\"-1\" si "
+"\"arguments\" n'a pas été trouvé), \"pos_channel\" : index de \"channel\" "
+"dans le message (\"-1\" si \"channel\" n'a pas été trouvé), \"pos_text\" : "
+"index de \"text\" dans le message (\"-1\" si \"text\" n'a pas été trouvé)"
msgid "split an IRC message (to fit in 512 bytes)"
msgstr "découper un message IRC (pour tenir dans les 512 octets)"
diff --git a/po/hu.po b/po/hu.po
index f6137e65b..3e1305c87 100644
--- a/po/hu.po
+++ b/po/hu.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6864,6 +6864,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
@@ -7028,8 +7035,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
msgid "split an IRC message (to fit in 512 bytes)"
diff --git a/po/it.po b/po/it.po
index 265c9ab76..ddda9ae65 100644
--- a/po/it.po
+++ b/po/it.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7906,6 +7906,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
"se disabilitato, i codici colori vengono ignorati nei messaggi in entrata"
@@ -8065,8 +8072,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"tags\": tag, \"message_without_tags\": messaggio senza tag, \"nick\": "
"nick, \"host\": nome host, \"command\": comando, \"channel\": canale, "
diff --git a/po/ja.po b/po/ja.po
index b618bd413..29844b569 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-08-10 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/translation_ja>\n"
@@ -8081,6 +8081,13 @@ msgstr ""
"以外の場合 $ident は \"*\" になります; 設定したデフォルトマスクはニックネーム"
"のホスト名がわかる場合のみ利用されます"
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr "オフの場合、到着メッセージに含まれる色コードを無視"
@@ -8233,12 +8240,16 @@ msgid "\"message\": IRC message, \"server\": server name (optional)"
msgstr "\"message\": IRC メッセージ、\"server\": サーバ名 (任意)"
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
+#, fuzzy
msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"tags\": タグ、\"message_without_tags\": タグを含まないメッセージ、\"nick"
"\": ニックネーム、\"host\": ホスト名、\"command\": コマンド、\"channel\": "
diff --git a/po/pl.po b/po/pl.po
index 2682b80e7..4bd11a2f4 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-08-14 17:54+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@szluug.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -5055,23 +5055,28 @@ msgid ""
"sajoin:\n"
" /alias addcompletion %%sajoin forcejoin /quote forcejoin"
msgstr ""
-" list: lista aliasów (ta lista wyświetlana jest jeśli nie zostanie podany argument)\n"
+" list: lista aliasów (ta lista wyświetlana jest jeśli nie zostanie "
+"podany argument)\n"
" add: dodaje alias\n"
"addcompletion: dodaje alias z niestandardowym dopełnieniem\n"
" del: usuwa alias\n"
-" completion: dopełnienie dla aliasu: domyślnie dopełnienie wykonuje się z docelową komendą\n"
-" uwaga: można użyć %%komenda w celu użycia dopełnień dla istniejących komend\n"
+" completion: dopełnienie dla aliasu: domyślnie dopełnienie wykonuje się z "
+"docelową komendą\n"
+" uwaga: można użyć %%komenda w celu użycia dopełnień dla "
+"istniejących komend\n"
" alias: nazwa aliasu\n"
" komenda: nazwa komendy (wiele komend można oddzielić za pomocą średnika)\n"
"\n"
-"Ważne: dla komend specjalne zmienne są zastępowane odpowiednimi wartościami:\n"
+"Ważne: dla komend specjalne zmienne są zastępowane odpowiednimi "
+"wartościami:\n"
" $n: argument 'n' (pomiędzy 1 i 9)\n"
" $-m: argumenty od 1 do 'm'\n"
" $n-: argumenty od 'n' do ostatniego\n"
" $n-m: argumenty od 'n' od 'm'\n"
" $*: wszystkie argumenty\n"
" $~: ostatni argument\n"
-" $var: gdzie \"var\" to zmienna lokalna buforu (zobacz /buffer localvar)\n"
+" $var: gdzie \"var\" to zmienna lokalna buforu (zobacz /buffer "
+"localvar)\n"
" przykłady: $nick, $channel, $server, $plugin, $name\n"
"\n"
"Przykłady:\n"
@@ -8247,6 +8252,13 @@ msgstr ""
"się od \"~\", w przeciwnym wypadku jest ustawiany na \"*\"; domyślna maska "
"używana jest tylko, kiedy WeeChat zna nazwę hosta dla nicka"
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
"kiedy wyłączone (off) kody kolorów są ignorowane w przychodzących "
@@ -8406,12 +8418,16 @@ msgid "\"message\": IRC message, \"server\": server name (optional)"
msgstr "\"message\": wiadomość IRC, \"server\": nazwa serwera (opcjonalne)"
#. TRANSLATORS: please do not translate key names (enclosed by quotes)
+#, fuzzy
msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"tags\": tagi, \"message_without_tags\": wiadomość bez tagów, \"nick\": "
"nick, \"host\": host, \"command\": komenda, \"channel\": kanał, \"arguments"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index dfa5a22b9..0ca216b41 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -7280,6 +7280,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
"quando desligado, códigos de cores são ignorados em mensagens recebidas"
@@ -7436,8 +7443,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
"\"nick\": apelido, \"host\": host, \"command\": comando, \"channel\": canal, "
"\"arguments\": argumentos (inclui canal)"
diff --git a/po/ru.po b/po/ru.po
index eeaa64984..6ed4541fb 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-07-26 09:42+0200\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6891,6 +6891,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr "когда выключено, цвета в исходящих сообщениях игнорируются"
@@ -7060,8 +7067,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
msgid "split an IRC message (to fit in 512 bytes)"
diff --git a/po/tr.po b/po/tr.po
index 372038eea..e6327842a 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2015-03-10 21:33+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6170,6 +6170,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
@@ -6312,8 +6319,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
msgid "split an IRC message (to fit in 512 bytes)"
diff --git a/po/weechat.pot b/po/weechat.pot
index 7aa219368..2e1121911 100644
--- a/po/weechat.pot
+++ b/po/weechat.pot
@@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
-"POT-Creation-Date: 2015-08-11 22:24+0200\n"
+"POT-Creation-Date: 2015-08-14 21:16+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@@ -6099,6 +6099,13 @@ msgid ""
"knows the host for the nick"
msgstr ""
+msgid ""
+"decode/encode channel name inside messages using charset options (like it "
+"was done in WeeChat <= 1.2); it is recommended to keep that off if you use "
+"only UTF-8 in channel names; you can enable this option if you are using an "
+"exotic charset like ISO in channel names"
+msgstr ""
+
msgid "when off, colors codes are ignored in incoming messages"
msgstr ""
@@ -6240,8 +6247,11 @@ msgid ""
"\"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)"
+"user message), \"pos_command\": index of \"command\" message (\"-1\" if "
+"\"command\" was not found), \"pos_arguments\": index of \"arguments\" "
+"message (\"-1\" if \"arguments\" was not found), \"pos_channel\": index of "
+"\"channel\" message (\"-1\" if \"channel\" was not found), \"pos_text\": "
+"index of \"text\" message (\"-1\" if \"text\" was not found)"
msgstr ""
msgid "split an IRC message (to fit in 512 bytes)"
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index 5f9dfc451..1affe899f 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -135,6 +135,7 @@ struct t_config_option *irc_config_network_alternate_nick;
struct t_config_option *irc_config_network_autoreconnect_delay_growing;
struct t_config_option *irc_config_network_autoreconnect_delay_max;
struct t_config_option *irc_config_network_ban_mask_default;
+struct t_config_option *irc_config_network_channel_encode;
struct t_config_option *irc_config_network_colors_receive;
struct t_config_option *irc_config_network_colors_send;
struct t_config_option *irc_config_network_lag_check;
@@ -2971,6 +2972,15 @@ irc_config_init ()
"default mask is used only if WeeChat knows the host for the nick"),
NULL, 0, 0, "*!$ident@$host", NULL, 0, NULL, NULL,
NULL, NULL, NULL, NULL);
+ irc_config_network_channel_encode = weechat_config_new_option (
+ irc_config_file, ptr_section,
+ "channel_encode", "boolean",
+ N_("decode/encode channel name inside messages using charset options "
+ "(like it was done in WeeChat <= 1.2); it is recommended to keep "
+ "that off if you use only UTF-8 in channel names; you can enable "
+ "this option if you are using an exotic charset like ISO in "
+ "channel names"),
+ NULL, 0, 0, "off", NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL);
irc_config_network_colors_receive = weechat_config_new_option (
irc_config_file, ptr_section,
"colors_receive", "boolean",
diff --git a/src/plugins/irc/irc-config.h b/src/plugins/irc/irc-config.h
index 4193ed1d8..cd0a766b5 100644
--- a/src/plugins/irc/irc-config.h
+++ b/src/plugins/irc/irc-config.h
@@ -176,6 +176,7 @@ extern struct t_config_option *irc_config_network_alternate_nick;
extern struct t_config_option *irc_config_network_autoreconnect_delay_growing;
extern struct t_config_option *irc_config_network_autoreconnect_delay_max;
extern struct t_config_option *irc_config_network_ban_mask_default;
+extern struct t_config_option *irc_config_network_channel_encode;
extern struct t_config_option *irc_config_network_colors_receive;
extern struct t_config_option *irc_config_network_colors_send;
extern struct t_config_option *irc_config_network_lag_check;
diff --git a/src/plugins/irc/irc-info.c b/src/plugins/irc/irc-info.c
index b235e1f50..f905a6a4b 100644
--- a/src/plugins/irc/irc-info.c
+++ b/src/plugins/irc/irc-info.c
@@ -844,11 +844,22 @@ irc_info_init ()
N_("parse an IRC message"),
N_("\"message\": IRC message, \"server\": server name (optional)"),
/* TRANSLATORS: please do not translate key names (enclosed by quotes) */
- N_("\"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)"),
+ N_("\"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_command\": index of \"command\" message (\"-1\" if "
+ "\"command\" was not found), "
+ "\"pos_arguments\": index of \"arguments\" message (\"-1\" if "
+ "\"arguments\" was not found), "
+ "\"pos_channel\": index of \"channel\" message (\"-1\" if "
+ "\"channel\" was not found), "
+ "\"pos_text\": index of \"text\" message (\"-1\" if "
+ "\"text\" was not found)"),
&irc_info_info_hashtable_irc_message_parse_cb, NULL);
weechat_hook_info_hashtable (
"irc_message_split",
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index 855ac045e..e0c4dcf4f 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -39,6 +39,9 @@
* - channel (string)
* - arguments (string)
* - text (string)
+ * - pos_command (integer: command index in message)
+ * - pos_arguments (integer: arguments index in message)
+ * - pos_channel (integer: channel index in message)
* - pos_text (integer: text index in message)
*
* Example:
@@ -53,6 +56,9 @@
* channel: "#weechat"
* arguments: "#weechat :hello!"
* text: "hello!"
+ * pos_command: 47
+ * pos_arguments: 55
+ * pos_channel: 55
* pos_text: 65
*/
@@ -60,7 +66,9 @@ void
irc_message_parse (struct t_irc_server *server, const char *message,
char **tags, char **message_without_tags, char **nick,
char **host, char **command, char **channel,
- char **arguments, char **text, int *pos_text)
+ char **arguments, char **text,
+ int *pos_command, int *pos_arguments, int *pos_channel,
+ int *pos_text)
{
const char *ptr_message, *pos, *pos2, *pos3, *pos4;
@@ -80,6 +88,12 @@ irc_message_parse (struct t_irc_server *server, const char *message,
*arguments = NULL;
if (text)
*text = NULL;
+ if (pos_command)
+ *pos_command = -1;
+ if (pos_arguments)
+ *pos_arguments = -1;
+ if (pos_channel)
+ *pos_channel = -1;
if (pos_text)
*pos_text = -1;
@@ -166,6 +180,8 @@ irc_message_parse (struct t_irc_server *server, const char *message,
{
if (command)
*command = weechat_strndup (ptr_message, pos - ptr_message);
+ if (pos_command)
+ *pos_command = ptr_message - message;
pos++;
while (pos[0] == ' ')
{
@@ -174,6 +190,8 @@ irc_message_parse (struct t_irc_server *server, const char *message,
/* now we have: pos --> "#weechat :hello!" */
if (arguments)
*arguments = strdup (pos);
+ if (pos_arguments)
+ *pos_arguments = pos - message;
if ((pos[0] == ':')
&& ((strncmp (ptr_message, "JOIN ", 5) == 0)
|| (strncmp (ptr_message, "PART ", 5) == 0)))
@@ -199,6 +217,8 @@ irc_message_parse (struct t_irc_server *server, const char *message,
else
*channel = strdup (pos);
}
+ if (pos_channel)
+ *pos_channel = pos - message;
if (pos2)
{
while (pos2[0] == ' ')
@@ -241,6 +261,8 @@ irc_message_parse (struct t_irc_server *server, const char *message,
else
*channel = strdup (pos2);
}
+ if (pos_channel)
+ *pos_channel = pos2 - message;
if (pos4)
{
while (pos4[0] == ' ')
@@ -255,9 +277,13 @@ irc_message_parse (struct t_irc_server *server, const char *message,
*pos_text = pos4 - message;
}
}
- else if (channel && !*channel)
+ else if ((channel && !*channel)
+ || (pos_channel && (*pos_channel < 0)))
{
- *channel = weechat_strndup (pos, pos3 - pos);
+ if (channel)
+ *channel = weechat_strndup (pos, pos3 - pos);
+ if (pos_channel)
+ *pos_channel = pos - message;
}
}
}
@@ -267,6 +293,8 @@ irc_message_parse (struct t_irc_server *server, const char *message,
{
if (command)
*command = strdup (ptr_message);
+ if (pos_command)
+ *pos_command = ptr_message - message;
}
}
}
@@ -281,6 +309,9 @@ irc_message_parse (struct t_irc_server *server, const char *message,
* - channel
* - arguments
* - text
+ * - pos_command
+ * - pos_arguments
+ * - pos_channel
* - pos_text
*
* Note: hashtable must be freed after use.
@@ -291,14 +322,14 @@ irc_message_parse_to_hashtable (struct t_irc_server *server,
const char *message)
{
char *tags,*message_without_tags, *nick, *host, *command, *channel;
- char *arguments, *text, str_pos_text[32];
+ char *arguments, *text, str_pos[32];
char empty_str[1] = { '\0' };
- int pos_text;
+ int pos_command, pos_arguments, pos_channel, pos_text;
struct t_hashtable *hashtable;
irc_message_parse (server, message, &tags, &message_without_tags, &nick,
&host, &command, &channel, &arguments, &text,
- &pos_text);
+ &pos_command, &pos_arguments, &pos_channel, &pos_text);
hashtable = weechat_hashtable_new (32,
WEECHAT_HASHTABLE_STRING,
@@ -324,8 +355,14 @@ irc_message_parse_to_hashtable (struct t_irc_server *server,
(arguments) ? arguments : empty_str);
weechat_hashtable_set (hashtable, "text",
(text) ? text : empty_str);
- snprintf (str_pos_text, sizeof (str_pos_text), "%d", pos_text);
- weechat_hashtable_set (hashtable, "pos_text", str_pos_text);
+ snprintf (str_pos, sizeof (str_pos), "%d", pos_command);
+ weechat_hashtable_set (hashtable, "pos_command", str_pos);
+ snprintf (str_pos, sizeof (str_pos), "%d", pos_arguments);
+ weechat_hashtable_set (hashtable, "pos_arguments", str_pos);
+ snprintf (str_pos, sizeof (str_pos), "%d", pos_channel);
+ weechat_hashtable_set (hashtable, "pos_channel", str_pos);
+ snprintf (str_pos, sizeof (str_pos), "%d", pos_text);
+ weechat_hashtable_set (hashtable, "pos_text", str_pos);
if (tags)
free (tags);
diff --git a/src/plugins/irc/irc-message.h b/src/plugins/irc/irc-message.h
index bb3051d57..026595b7e 100644
--- a/src/plugins/irc/irc-message.h
+++ b/src/plugins/irc/irc-message.h
@@ -27,7 +27,8 @@ extern void irc_message_parse (struct t_irc_server *server, const char *message,
char **tags, char **message_without_tags,
char **nick, char **host, char **command,
char **channel, char **arguments, char **text,
- int *pos_text);
+ int *pos_command, int *pos_arguments,
+ int *pos_channel, int *pos_text);
extern struct t_hashtable *irc_message_parse_to_hashtable (struct t_irc_server *server,
const char *message);
extern char *irc_message_convert_charset (const char *message,
diff --git a/src/plugins/irc/irc-notify.c b/src/plugins/irc/irc-notify.c
index 653df5a11..cb9a2e590 100644
--- a/src/plugins/irc/irc-notify.c
+++ b/src/plugins/irc/irc-notify.c
@@ -835,7 +835,8 @@ irc_notify_hsignal_cb (void *data, const char *signal,
for (i = 0; i < num_messages; i++)
{
irc_message_parse (ptr_server, messages[i], NULL, NULL, NULL,
- NULL, NULL, NULL, &arguments, NULL, NULL);
+ NULL, NULL, NULL, &arguments, NULL, NULL,
+ NULL, NULL, NULL);
if (arguments)
{
pos = strchr (arguments, ' ');
@@ -918,7 +919,7 @@ irc_notify_hsignal_cb (void *data, const char *signal,
{
irc_message_parse (ptr_server, messages[0], NULL, NULL,
NULL, NULL, &irc_cmd, NULL, &arguments,
- NULL, NULL);
+ NULL, NULL, NULL, NULL, NULL);
if (irc_cmd && arguments)
{
if (strcmp (irc_cmd, "401") == 0)
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 16fa9e104..83759ee53 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -2059,7 +2059,8 @@ irc_server_send_one_msg (struct t_irc_server *server, int flags,
const char *ptr_msg, *ptr_chan_nick;
char *new_msg, *pos, *tags_to_send, *msg_encoded;
char str_modifier[128], modifier_data[256];
- int rc, queue_msg, add_to_queue, first_message, anti_flood, pos_text;
+ int rc, queue_msg, add_to_queue, first_message, anti_flood;
+ int pos_channel, pos_text, pos_encode;
time_t time_now;
struct t_irc_redirect *ptr_redirect;
@@ -2088,8 +2089,12 @@ irc_server_send_one_msg (struct t_irc_server *server, int flags,
msg_encoded = NULL;
irc_message_parse (server, ptr_msg, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, &pos_text);
- if (pos_text >= 0)
+ NULL, NULL, NULL, NULL, &pos_channel, &pos_text);
+ if (weechat_config_boolean (irc_config_network_channel_encode))
+ pos_encode = (pos_channel >= 0) ? pos_channel : pos_text;
+ else
+ pos_encode = pos_text;
+ if (pos_encode >= 0)
{
ptr_chan_nick = (channel) ? channel : nick;
if (ptr_chan_nick)
@@ -2107,7 +2112,7 @@ irc_server_send_one_msg (struct t_irc_server *server, int flags,
weechat_plugin->name,
server->name);
}
- msg_encoded = irc_message_convert_charset (ptr_msg, pos_text,
+ msg_encoded = irc_message_convert_charset (ptr_msg, pos_encode,
"charset_encode",
modifier_data);
}
@@ -2283,7 +2288,8 @@ irc_server_sendf (struct t_irc_server *server, int flags, const char *tags,
{
/* run modifier "irc_out1_xxx" (like "irc_out_xxx", but before split) */
irc_message_parse (server, items[i], NULL, NULL,
- &nick, NULL, &command, &channel, NULL, NULL, NULL);
+ &nick, NULL, &command, &channel, NULL, NULL, NULL,
+ NULL, NULL, NULL);
snprintf (str_modifier, sizeof (str_modifier),
"irc_out1_%s",
(command) ? command : "unknown");
@@ -2520,7 +2526,7 @@ irc_server_msgq_flush ()
char *tags, *nick, *host, *command, *channel, *arguments;
char *msg_decoded, *msg_decoded_without_color;
char str_modifier[128], modifier_data[256];
- int pos_text;
+ int pos_channel, pos_text, pos_decode;
while (irc_recv_msgq)
{
@@ -2542,7 +2548,8 @@ irc_server_msgq_flush ()
irc_message_parse (irc_recv_msgq->server,
ptr_data, NULL, NULL, NULL, NULL,
- &command, NULL, NULL, NULL, NULL);
+ &command, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL);
snprintf (str_modifier, sizeof (str_modifier),
"irc_in_%s",
(command) ? command : "unknown");
@@ -2583,10 +2590,15 @@ irc_server_msgq_flush ()
irc_message_parse (irc_recv_msgq->server, ptr_msg,
&tags, NULL, &nick, &host,
&command, &channel, &arguments,
- NULL, &pos_text);
+ NULL, NULL, NULL,
+ &pos_channel, &pos_text);
msg_decoded = NULL;
- if (pos_text >= 0)
+ if (weechat_config_boolean (irc_config_network_channel_encode))
+ pos_decode = (pos_channel >= 0) ? pos_channel : pos_text;
+ else
+ pos_decode = pos_text;
+ if (pos_decode >= 0)
{
/* convert charset for message */
if (channel
@@ -2620,7 +2632,7 @@ irc_server_msgq_flush ()
}
}
msg_decoded = irc_message_convert_charset (
- ptr_msg, pos_text,
+ ptr_msg, pos_decode,
"charset_decode", modifier_data);
}