1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

doc: improve display of WeeChat version in info_hashtable "irc_message_parse" (scripting guide)

This commit is contained in:
Sébastien Helleu
2021-04-11 09:47:13 +02:00
parent 5d30e0faac
commit 044bcd0751
6 changed files with 115 additions and 90 deletions
+20 -15
View File
@@ -1275,63 +1275,68 @@ Das Ergebnis ist eine Hashtabelle mit folgenden Schlüsseln
(das Beispiel bezieht sich auf folgende IRC Nachricht:
`+@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!+`):
[width="100%",cols="1,^2,10,8",options="header"]
[width="100%",cols="3,^2,10,7",options="header"]
|===
| Schlüssel | WeeChat version | Beschreibung | Beispiel
// TRANSLATION MISSING
| Schlüssel | Since WeeChat ^(1)^ | Beschreibung | Beispiel
| Tags | 0.4.0 |
| Tags | 0.4.0 |
Tags in der Nachricht (kann leer sein). |
`+time=2015-06-27T16:40:35.000Z+`
| message_without_tags | 0.4.0 |
| message_without_tags | 0.4.0 |
Die IRC Nachricht ohne Tags (wie eine Nachricht ohne Tags). |
`+:nick!user@host PRIVMSG #weechat :hello!+`
| nick | 0.3.4 |
| nick | 0.3.4 |
der ursprüngliche Nick. |
`+nick+`
| user | 2.7 |
| user | 2.7 |
der ursprüngliche Benutzer. |
`+user+`
| host | 0.3.4 |
| host | 0.3.4 |
der ursprüngliche Host (beinhaltet den Nick). |
`+nick!user@host+`
| command | 0.3.4 |
| command | 0.3.4 |
der Befehl (_PRIVMSG_, _NOTICE_, ...). |
`+PRIVMSG+`
| channel | 0.3.4 |
| channel | 0.3.4 |
der Zielchanne.l|
`+#weechat+`
| arguments | 0.3.4 |
| arguments | 0.3.4 |
das Argument des Befehls (beinhaltet den Channel). |
`+#weechat :hello!+`
| text | 1.3 |
| text | 1.3 |
der Text (zum Beispiel eine Nachricht eines Users). |
`+hello!+`
| pos_command | 1.3 |
| pos_command | 1.3 |
Index von _command_ innerhalb einer Nachricht ("-1" falls _command_ nicht gefunden wird). |
`+47+`
| pos_arguments | 1.3 |
| pos_arguments | 1.3 |
Index von_arguments_ innerhalb einer Nachricht ("-1" falls _arguments_ nicht gefunden wird). |
`+55+`
| pos_channel | 1.3 |
| pos_channel | 1.3 |
Index von _channel_ innerhalb einer Nachricht ("-1" falls _channel_ nicht gefunden wird). |
`+55+`
| pos_text | 1.3 |
| pos_text | 1.3 |
Index von _text_ innerhalb einer Nachricht ("-1" falls _text_ nicht gefunden wird). |
`+65+`
|===
// TRANSLATION MISSING
[NOTE]
^(1)^ The key has been introduced in this WeeChat version.
[source,python]
----
dict = weechat.info_get_hashtable(
+18 -15
View File
@@ -1248,63 +1248,66 @@ 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"]
[width="100%",cols="3,^2,10,7",options="header"]
|===
| Key | WeeChat version | Description | Example
| Key | Since WeeChat ^(1)^ | Description | Example
| tags | 0.4.0 |
| tags | 0.4.0 |
The tags in message (can be empty). |
`+time=2015-06-27T16:40:35.000Z+`
| message_without_tags | 0.4.0 |
| 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 |
| nick | 0.3.4 |
The origin nick. |
`+nick+`
| user | 2.7 |
| user | 2.7 |
The origin user. |
`+user+`
| host | 0.3.4 |
| host | 0.3.4 |
The origin host (includes the nick). |
`+nick!user@host+`
| command | 0.3.4 |
| command | 0.3.4 |
The command (_PRIVMSG_, _NOTICE_, ...). |
`+PRIVMSG+`
| channel | 0.3.4 |
| channel | 0.3.4 |
The target channel. |
`+#weechat+`
| arguments | 0.3.4 |
| arguments | 0.3.4 |
The command arguments (includes the channel). |
`+#weechat :hello!+`
| text | 1.3 |
| text | 1.3 |
The text (for example user message). |
`+hello!+`
| pos_command | 1.3 |
| pos_command | 1.3 |
The index of _command_ in message ("-1" if _command_ was not found). |
`+47+`
| pos_arguments | 1.3 |
| pos_arguments | 1.3 |
The index of _arguments_ in message ("-1" if _arguments_ was not found). |
`+55+`
| pos_channel | 1.3 |
| pos_channel | 1.3 |
The index of _channel_ in message ("-1" if _channel_ was not found). |
`+55+`
| pos_text | 1.3 |
| pos_text | 1.3 |
The index of _text_ in message ("-1" if _text_ was not found). |
`+65+`
|===
[NOTE]
^(1)^ The key has been introduced in this WeeChat version.
[source,python]
----
dict = weechat.info_get_hashtable(
+18 -15
View File
@@ -1285,64 +1285,67 @@ 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"]
[width="100%",cols="3,^2,10,7",options="header"]
|===
| Clé | Version de WeeChat | Description | Exemple
| Clé | Depuis WeeChat ^(1)^ | Description | Exemple
| tags | 0.4.0 |
| 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 |
| 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 |
| nick | 0.3.4 |
Le pseudo d'origine. |
`+nick+`
| user | 2.7 |
| user | 2.7 |
L'utilisateur d'origine. |
`+user+`
| host | 0.3.4 |
| host | 0.3.4 |
L'hôte d'origine (incluant le pseudo). |
`+nick!user@host+`
| command | 0.3.4 |
| command | 0.3.4 |
La commande (_PRIVMSG_, _NOTICE_, ...). |
`+PRIVMSG+`
| channel | 0.3.4 |
| channel | 0.3.4 |
Le canal cible. |
`+#weechat+`
| arguments | 0.3.4 |
| arguments | 0.3.4 |
Les paramètres de la commande (incluant le canal). |
`+#weechat :hello!+`
| text | 1.3 |
| text | 1.3 |
Le texte (par exemple un message utilisateur). |
`+hello!+`
| pos_command | 1.3 |
| pos_command | 1.3 |
La position de _command_ dans le message ("-1" si _command_ n'a pas été trouvé). |
`+47+`
| pos_arguments | 1.3 |
| pos_arguments | 1.3 |
La position de _arguments_ dans le message ("-1" si _arguments_ n'a pas été trouvé). |
`+55+`
| pos_channel | 1.3 |
| pos_channel | 1.3 |
La position de _channel_ dans le message ("-1" si _channel_ n'a pas été trouvé). |
`+55+`
| pos_text | 1.3 |
| pos_text | 1.3 |
La position de _text_ dans le message ("-1" si _text_ n'a pas été trouvé). |
`+65+`
|===
[NOTE]
^(1)^ La clé a été introduite dans cette version de WeeChat.
[source,python]
----
dict = weechat.info_get_hashtable(
+19 -15
View File
@@ -1304,64 +1304,68 @@ 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"]
[width="100%",cols="3,^2,10,7",options="header"]
|===
| Key | WeeChat version | Description | Example
| Key | Since WeeChat ^(1)^ | Description | Example
| tags | 0.4.0 |
| tags | 0.4.0 |
The tags in message (can be empty). |
`+time=2015-06-27T16:40:35.000Z+`
| message_without_tags | 0.4.0 |
| 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 |
| nick | 0.3.4 |
The origin nick. |
`+nick+`
// TRANSLATION MISSING
| user | 2.7 |
| user | 2.7 |
The origin user. |
`+user+`
| host | 0.3.4 |
| host | 0.3.4 |
The origin host (includes the nick). |
`+nick!user@host+`
| command | 0.3.4 |
| command | 0.3.4 |
The command (_PRIVMSG_, _NOTICE_, ...). |
`+PRIVMSG+`
| channel | 0.3.4 |
| channel | 0.3.4 |
The target channel. |
`+#weechat+`
| arguments | 0.3.4 |
| arguments | 0.3.4 |
The command arguments (includes the channel). |
`+#weechat :hello!+`
| text | 1.3 |
| text | 1.3 |
The text (for example user message). |
`+hello!+`
| pos_command | 1.3 |
| pos_command | 1.3 |
The index of _command_ in message ("-1" if _command_ was not found). |
`+47+`
| pos_arguments | 1.3 |
| pos_arguments | 1.3 |
The index of _arguments_ in message ("-1" if _arguments_ was not found). |
`+55+`
| pos_channel | 1.3 |
| pos_channel | 1.3 |
The index of _channel_ in message ("-1" if _channel_ was not found). |
`+55+`
| pos_text | 1.3 |
| pos_text | 1.3 |
The index of _text_ in message ("-1" if _text_ was not found). |
`+65+`
|===
// TRANSLATION MISSING
[NOTE]
^(1)^ The key has been introduced in this WeeChat version.
[source,python]
----
dict = weechat.info_get_hashtable(
+20 -15
View File
@@ -1278,64 +1278,69 @@ _WeeChat バージョン 0.3.4 以上で利用可。_
(例の値は以下のメッセージから作られました:
`+@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!+`):
[width="100%",cols="1,^2,10,8",options="header"]
[width="100%",cols="3,^2,10,7",options="header"]
|===
| キー | WeeChat バージョン | 説明 | 例
// TRANSLATION MISSING
| キー | Since WeeChat ^(1)^ | 説明 | 例
| tags | 0.4.0 以上 |
| tags | 0.4.0 |
メッセージに付けられたタグ (空にすることも可) |
`+time=2015-06-27T16:40:35.000Z+`
| message_without_tags | 0.4.0 以上 |
| message_without_tags | 0.4.0 |
タグを除いたメッセージ (タグが付けられていなければメッセージと同じ) |
`+:nick!user@host PRIVMSG #weechat :hello!+`
| nick | 0.3.4 以上 |
| nick | 0.3.4 |
発信者のニックネーム |
`+nick+`
// TRANSLATION MISSING
| user | 2.7 |
| user | 2.7 |
The origin user. |
`+user+`
| host | 0.3.4 以上 |
| host | 0.3.4 |
発信者のホスト (ニックネームを含む) |
`+nick!user@host+`
| command | 0.3.4 以上 |
| command | 0.3.4 |
コマンド (_PRIVMSG_、_NOTICE_、...) |
`+PRIVMSG+`
| channel | 0.3.4 以上 |
| channel | 0.3.4 |
送信先チャンネル |
`+#weechat+`
| arguments | 0.3.4 以上 |
| arguments | 0.3.4 |
コマンド引数 (チャンネルを含む) |
`+#weechat :hello!+`
| text | 1.3 以上 |
| text | 1.3 |
テキスト (ユーザメッセージなど) |
`+hello!+`
| pos_command | 1.3 以上 |
| pos_command | 1.3 |
メッセージ内における _command_ のインデックス (_command_ が見つからない場合 "-1") |
`+47+`
| pos_arguments | 1.3 以上 |
| pos_arguments | 1.3 |
メッセージ内における _arguments_ のインデックス (_arguments_ が見つからない場合 "-1") |
`+55+`
| pos_channel | 1.3 以上 |
| pos_channel | 1.3 |
メッセージ内における _channel_ のインデックス (_channel_ が見つからない場合 "-1") |
`+55+`
| pos_text | 1.3 以上 |
| pos_text | 1.3 |
メッセージ内における _text_ のインデックス (_text_ が見つからない場合 "-1") |
`+65+`
|===
// TRANSLATION MISSING
[NOTE]
^(1)^ The key has been introduced in this WeeChat version.
[source,python]
----
dict = weechat.info_get_hashtable(
+20 -15
View File
@@ -1255,63 +1255,68 @@ Wynik jest tabela hashy z następującymi kluczami
(przykładowe wartości zostały uzyskane za pomocą wiadomości:
`+@time=2015-06-27T16:40:35.000Z :nick!user@host PRIVMSG #weechat :hello!+`):
[width="100%",cols="1,^2,10,8",options="header"]
[width="100%",cols="3,^2,10,7",options="header"]
|===
| Klucz | Wersja WeeChat | Opis | Przykład
// TRANSLATION MISSING
| Klucz | Since WeeChat ^(1)^ | Opis | Przykład
| tags | 0.4.0 |
| tags | 0.4.0 |
Tagi w wiadomości (mogą byc puste). |
`+time=2015-06-27T16:40:35.000Z+`
| message_without_tags | 0.4.0 |
| message_without_tags | 0.4.0 |
Wiadomość bez tagów (jeśli nie ma tagów jest to to samo co wiadomość). |
`+:nick!user@host PRIVMSG #weechat :hello!+`
| nick | 0.3.4 |
| nick | 0.3.4 |
Nick żródła. |
`+nick+`
| user | 2.7 |
| user | 2.7 |
Oryginalny użytkownik. |
`+user+`
| host | 0.3.4 |
| host | 0.3.4 |
Host żródła (zawiera nick). |
`+nick!user@host+`
| command | 0.3.4 |
| command | 0.3.4 |
Komenda (_PRIVMSG_, _NOTICE_, ...). |
`+PRIVMSG+`
| channel | 0.3.4 |
| channel | 0.3.4 |
Docelowy kanał. |
`+#weechat+`
| arguments | 0.3.4 |
| arguments | 0.3.4 |
Argumenty komendy (zawierają kanał). |
`+#weechat :hello!+`
| text | 1.3 |
| text | 1.3 |
Tekst (na przykład wiadomość użytkownika). |
`+hello!+`
| pos_command | 1.3 |
| pos_command | 1.3 |
The index of _command_ in message ("-1" if _command_ was not found). |
`+47+`
| pos_arguments | 1.3 |
| pos_arguments | 1.3 |
The index of _arguments_ in message ("-1" if _arguments_ was not found). |
`+55+`
| pos_channel | 1.3 |
| pos_channel | 1.3 |
The index of _channel_ in message ("-1" if _channel_ was not found). |
`+55+`
| pos_text | 1.3 |
| pos_text | 1.3 |
The index of _text_ in message ("-1" if _text_ was not found). |
`+65+`
|===
// TRANSLATION MISSING
[NOTE]
^(1)^ The key has been introduced in this WeeChat version.
[source,python]
----
dict = weechat.info_get_hashtable(