mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
trigger: add variables ${tg_tag_irc_xxx} containing IRC message tags (issue #1680)
This commit is contained in:
@@ -22,6 +22,7 @@ New features::
|
||||
|
||||
* irc: add IRC message tags in messages displayed (issue #1680)
|
||||
* relay: add `zstd` (https://facebook.github.io/zstd/[Zstandard]) compression in weechat protocol, remove option `compression` from `init` command, rename option relay.network.compression_level to relay.network.compression
|
||||
* trigger: add variables `${tg_tag_irc_xxx}` containing IRC message tags (issue #1680)
|
||||
|
||||
Bug fixes::
|
||||
|
||||
|
||||
@@ -4728,6 +4728,8 @@ Variablen die mittels Tags in der Nachricht gesetzt werden:
|
||||
| tg_tag_prefix_nick | string | Nickfarbe für Präfix (extrahier aus Tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | Username und Host, Format: username@host (extrahiert aus Tag "host_xxx").
|
||||
| tg_tag_notify | string | Benachrichtigungsstufe (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | Benachrichtigungsstufe, falls von _none_ abweichend.
|
||||
| tg_msg_pv | string | "1" für eine private Nachricht, andernfalls "0".
|
||||
|===
|
||||
@@ -4761,6 +4763,8 @@ Variablen die mittels Tags in der Nachricht gesetzt werden:
|
||||
| tg_tag_prefix_nick | string | Nickfarbe für Präfix (extrahier aus Tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | Username und Host, Format: username@host (extrahiert aus Tag "host_xxx").
|
||||
| tg_tag_notify | string | Benachrichtigungsstufe (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | Benachrichtigungsstufe, falls von _none_ abweichend.
|
||||
| tg_msg_pv | string | "1" für eine private Nachricht, andernfalls "0".
|
||||
|===
|
||||
|
||||
@@ -4619,6 +4619,7 @@ Variables set using tags in message:
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
| tg_msg_pv | string | "1" for a private message, otherwise "0".
|
||||
|===
|
||||
@@ -4652,6 +4653,7 @@ Variables set using tags in message:
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
| tg_msg_pv | string | "1" for a private message, otherwise "0".
|
||||
|===
|
||||
|
||||
@@ -4780,6 +4780,7 @@ Variables définies avec les étiquettes du message :
|
||||
| tg_tag_prefix_nick | chaîne | Couleur du pseudo dans le préfixe (depuis l'étiquette "prefix_nick_ccc").
|
||||
| tg_tag_host | chaîne | Nom d'utilisateur et hôte, format : utilisateur@hôte (depuis l'étiquette "host_xxx").
|
||||
| tg_tag_notify | chaîne | Niveau de notification (_none_, _message_, _private_, _highlight_).
|
||||
| tg_tag_irc_xxx | chaîne | Étiquette de message IRC (clé "xxx").
|
||||
| tg_notify | chaîne | Niveau de notification, si différent de _none_.
|
||||
| tg_msg_pv | chaîne | "1" pour un message privé, sinon "0".
|
||||
|===
|
||||
@@ -4814,6 +4815,7 @@ Variables définies avec les étiquettes du message :
|
||||
| tg_tag_prefix_nick | chaîne | Couleur du pseudo dans le préfixe (depuis l'étiquette "prefix_nick_ccc").
|
||||
| tg_tag_host | chaîne | Nom d'utilisateur et hôte, format : utilisateur@hôte (depuis l'étiquette "host_xxx").
|
||||
| tg_tag_notify | chaîne | Niveau de notification (_none_, _message_, _private_, _highlight_).
|
||||
| tg_tag_irc_xxx | chaîne | Étiquette de message IRC (clé "xxx").
|
||||
| tg_notify | chaîne | Niveau de notification, si différent de _none_.
|
||||
| tg_msg_pv | chaîne | "1" pour un message privé, sinon "0".
|
||||
|===
|
||||
|
||||
@@ -4949,6 +4949,8 @@ Variables set using tags in message:
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
| tg_msg_pv | string | "1" for a private message, otherwise "0".
|
||||
|===
|
||||
@@ -4982,6 +4984,8 @@ Variables set using tags in message:
|
||||
| tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc").
|
||||
| tg_tag_host | string | User name and host, format: username@host (from tag "host_xxx").
|
||||
| tg_tag_notify | string | Notify level (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | Notify level, if different from _none_.
|
||||
| tg_msg_pv | string | "1" for a private message, otherwise "0".
|
||||
|===
|
||||
|
||||
@@ -4759,6 +4759,8 @@ _weechat_print_ 修飾子では、メッセージタグを使う変数 (下の
|
||||
| tg_tag_prefix_nick | string | プレフィックスで使うニックネームの色 ("prefix_nick_ccc" タグから)
|
||||
| tg_tag_host | string | ユーザ名とホスト名、書式: username@host ("host_xxx" タグから)
|
||||
| tg_tag_notify | string | 通知レベル (_none_、_message_、_private_、_highlight_)
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | 通知レベルが _none_ 以外の場合、その通知レベル
|
||||
| tg_msg_pv | string | プライベートメッセージの場合 "1"、それ以外は "0"
|
||||
|===
|
||||
@@ -4792,6 +4794,8 @@ _weechat_print_ 修飾子では、メッセージタグを使う変数 (下の
|
||||
| tg_tag_prefix_nick | string | プレフィックスで使うニックネームの色 ("prefix_nick_ccc" タグから)
|
||||
| tg_tag_host | string | ユーザ名とホスト名、書式: username@host ("host_xxx" タグから)
|
||||
| tg_tag_notify | string | 通知レベル (_none_、_message_、_private_、_highlight_)
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | string | IRC message tag (key "xxx").
|
||||
| tg_notify | string | 通知レベルが _none_ 以外の場合、その通知レベル
|
||||
| tg_msg_pv | string | プライベートメッセージの場合 "1"、それ以外は "0"
|
||||
|===
|
||||
|
||||
@@ -4656,6 +4656,8 @@ Zmienne ustawiane za pomocą tagów w wiadomościach:
|
||||
| tg_tag_prefix_nick | ciąg | Kolor nicka w prefiksie (z tagu "prefix_nick_ccc").
|
||||
| tg_tag_host | ciąg | Nazwa użytkownika i host, format: username@host (z tagu "host_xxx").
|
||||
| tg_tag_notify | ciąg | Poziom powiadomień (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | ciąg | IRC message tag (key "xxx").
|
||||
| tg_notify | ciąg | Poziom powiadomień, jeśli różny od _none_.
|
||||
| tg_msg_pv | ciąg | "1" dla prywatnej wiadomości, inaczej "0".
|
||||
|===
|
||||
@@ -4689,6 +4691,8 @@ Zmienne ustawiane za pomocą tagów w wiadomościach:
|
||||
| tg_tag_prefix_nick | ciąg | Kolor nicka w prefiksie (z tagu "prefix_nick_ccc").
|
||||
| tg_tag_host | ciąg | Nazwa użytkownika i host, format: username@host (z tagu "host_xxx").
|
||||
| tg_tag_notify | ciąg | Poziom powiadomień (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | ciąg | IRC message tag (key "xxx").
|
||||
| tg_notify | ciąg | Poziom powiadomień, jeśli różny od _none_.
|
||||
| tg_msg_pv | ciąg | "1" dla prywatnej wiadomości, inaczej "0".
|
||||
|===
|
||||
|
||||
@@ -4315,6 +4315,8 @@ ${buffer[${tg_signal_data}].full_name}
|
||||
| tg_tag_prefix_nick | стринг | Боја надимка у префиксу (из ознаке „prefix_nick_ccc”).
|
||||
| tg_tag_host | стринг | Корисничко име и хост, формат: корисничкоиме@хост (из ознаке „host_xxx”).
|
||||
| tg_tag_notify | стринг | Ниво обавештавања (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | стринг | IRC message tag (key "xxx").
|
||||
| tg_notify | стринг | Ниво обавештавања, ако се разликује од _none_.
|
||||
| tg_msg_pv | стринг | „1” за приватну поруку, у супротном „0”.
|
||||
|===
|
||||
@@ -4348,6 +4350,8 @@ ${buffer[${tg_signal_data}].full_name}
|
||||
| tg_tag_prefix_nick | стринг | Боја надимка у префиксу (из ознаке „prefix_nick_ccc”).
|
||||
| tg_tag_host | стринг | Корисничко име и хост, формат: корисничкоиме@хост (из ознаке „host_xxx”).
|
||||
| tg_tag_notify | стринг | Ниво обавештавања (_none_, _message_, _private_, _highlight_).
|
||||
// TRANSLATION MISSING
|
||||
| tg_tag_irc_xxx | стринг | IRC message tag (key "xxx").
|
||||
| tg_notify | стринг | Ниво обавештавања, ако се разликује од _none_.
|
||||
| tg_msg_pv | стринг | „1” за приватну поруку, у супротном „0”.
|
||||
|===
|
||||
|
||||
@@ -150,8 +150,8 @@ trigger_callback_set_tags (struct t_gui_buffer *buffer,
|
||||
const char **tags, int tags_count,
|
||||
struct t_hashtable *extra_vars)
|
||||
{
|
||||
const char *localvar_type;
|
||||
char str_temp[128];
|
||||
const char *localvar_type, *pos;
|
||||
char str_temp[1024], *key;
|
||||
int i;
|
||||
|
||||
snprintf (str_temp, sizeof (str_temp), "%d", tags_count);
|
||||
@@ -193,6 +193,28 @@ trigger_callback_set_tags (struct t_gui_buffer *buffer,
|
||||
{
|
||||
weechat_hashtable_set (extra_vars, "tg_tag_host", tags[i] + 5);
|
||||
}
|
||||
else if (strncmp (tags[i], "irc_tag_", 8) == 0)
|
||||
{
|
||||
/*
|
||||
* example:
|
||||
* tag: "irc_tag_time_2021-12-30T21:02:50.038Z"
|
||||
* is added in the hashtable like this:
|
||||
* key : "tg_tag_irc_time"
|
||||
* value: "2021-12-30T21:02:50.038Z"
|
||||
*/
|
||||
pos = strchr (tags[i] + 8, '_');
|
||||
if (pos && pos > tags[i] + 8)
|
||||
{
|
||||
key = weechat_strndup (tags[i] + 8, pos - tags[i] - 8);
|
||||
if (key)
|
||||
{
|
||||
snprintf (str_temp, sizeof (str_temp),
|
||||
"tg_tag_irc_%s", key);
|
||||
weechat_hashtable_set (extra_vars, str_temp, pos + 1);
|
||||
free (key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user