diff options
-rw-r--r-- | doc/de/weechat_user.de.txt | 3 | ||||
-rw-r--r-- | doc/en/weechat_user.en.txt | 3 | ||||
-rw-r--r-- | doc/fr/weechat_user.fr.txt | 3 | ||||
-rw-r--r-- | doc/it/weechat_user.it.txt | 3 | ||||
-rw-r--r-- | doc/ja/weechat_user.ja.txt | 3 | ||||
-rw-r--r-- | doc/pl/weechat_user.pl.txt | 3 | ||||
-rw-r--r-- | src/plugins/trigger/trigger-callback.c | 14 |
7 files changed, 21 insertions, 11 deletions
diff --git a/doc/de/weechat_user.de.txt b/doc/de/weechat_user.de.txt index c9e9002c6..1e4cc69cd 100644 --- a/doc/de/weechat_user.de.txt +++ b/doc/de/weechat_user.de.txt @@ -3297,9 +3297,10 @@ too): | Variable | Type | Description | tg_tags | string | Tags of message (with comma added at beginning/end of string) | tg_tags_count | string | Number of tags in message -| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') | tg_tag_nick | string | Nick (from tag "nick_xxx") | tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc") +| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') +| tg_notify | string | Notify level, if different from 'none' | tg_msg_pv | string | "1" for a private message, otherwise "0" |=== diff --git a/doc/en/weechat_user.en.txt b/doc/en/weechat_user.en.txt index 430c6c8aa..e86f6e4dd 100644 --- a/doc/en/weechat_user.en.txt +++ b/doc/en/weechat_user.en.txt @@ -3237,9 +3237,10 @@ too): | Variable | Type | Description | tg_tags | string | Tags of message (with comma added at beginning/end of string) | tg_tags_count | string | Number of tags in message -| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') | tg_tag_nick | string | Nick (from tag "nick_xxx") | tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc") +| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') +| tg_notify | string | Notify level, if different from 'none' | tg_msg_pv | string | "1" for a private message, otherwise "0" |=== diff --git a/doc/fr/weechat_user.fr.txt b/doc/fr/weechat_user.fr.txt index bf8483bc2..a2bf45736 100644 --- a/doc/fr/weechat_user.fr.txt +++ b/doc/fr/weechat_user.fr.txt @@ -3347,9 +3347,10 @@ pour le modificateur 'weechat_print') : | Variable | Type | Description | tg_tags | chaîne | Étiquettes du message (avec une virgule en début/fin de chaîne) | tg_tags_count | chaîne | Nombre d'étiquettes dans le message -| tg_tag_notify | chaîne | Niveau de notification ('none', 'message', 'private', 'highlight') | tg_tag_nick | chaîne | Pseudo (depuis l'étiquette "nick_xxx") | tg_tag_prefix_nick | chaîne | Couleur du pseudo dans le préfixe (depuis l'étiquette "prefix_nick_ccc") +| tg_tag_notify | chaîne | Niveau de notification ('none', 'message', 'private', 'highlight') +| tg_notify | chaîne | Niveau de notification, si différent de 'none' | tg_msg_pv | chaîne | "1" pour un message privé, sinon "0" |=== diff --git a/doc/it/weechat_user.it.txt b/doc/it/weechat_user.it.txt index 52f2280e8..49f28d8d9 100644 --- a/doc/it/weechat_user.it.txt +++ b/doc/it/weechat_user.it.txt @@ -3370,9 +3370,10 @@ too): | Variable | Type | Description | tg_tags | string | Tags of message (with comma added at beginning/end of string) | tg_tags_count | string | Number of tags in message -| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') | tg_tag_nick | string | Nick (from tag "nick_xxx") | tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc") +| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') +| tg_notify | string | Notify level, if different from 'none' | tg_msg_pv | string | "1" for a private message, otherwise "0" |=== diff --git a/doc/ja/weechat_user.ja.txt b/doc/ja/weechat_user.ja.txt index f2f067a47..d1a6e576e 100644 --- a/doc/ja/weechat_user.ja.txt +++ b/doc/ja/weechat_user.ja.txt @@ -3241,9 +3241,10 @@ too): | Variable | Type | Description | tg_tags | string | Tags of message (with comma added at beginning/end of string) | tg_tags_count | string | Number of tags in message -| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') | tg_tag_nick | string | Nick (from tag "nick_xxx") | tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc") +| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') +| tg_notify | string | Notify level, if different from 'none' | tg_msg_pv | string | "1" for a private message, otherwise "0" |=== diff --git a/doc/pl/weechat_user.pl.txt b/doc/pl/weechat_user.pl.txt index 79a221219..2cec905f9 100644 --- a/doc/pl/weechat_user.pl.txt +++ b/doc/pl/weechat_user.pl.txt @@ -3262,9 +3262,10 @@ too): | Variable | Type | Description | tg_tags | string | Tags of message (with comma added at beginning/end of string) | tg_tags_count | string | Number of tags in message -| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') | tg_tag_nick | string | Nick (from tag "nick_xxx") | tg_tag_prefix_nick | string | Color of nick in prefix (from tag "prefix_nick_ccc") +| tg_tag_notify | string | Notify level ('none', 'message', 'private', 'highlight') +| tg_notify | string | Notify level, if different from 'none' | tg_msg_pv | string | "1" for a private message, otherwise "0" |=== diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c index 398b8f22b..d9d82101e 100644 --- a/src/plugins/trigger/trigger-callback.c +++ b/src/plugins/trigger/trigger-callback.c @@ -97,12 +97,16 @@ trigger_callback_set_tags (struct t_gui_buffer *buffer, else if (strncmp (tags[i], "notify_", 7) == 0) { weechat_hashtable_set (extra_vars, "tg_tag_notify", tags[i] + 7); - if (strcmp (tags[i] + 7, "private") == 0) + if (strcmp (tags[i] + 7, "none") != 0) { - snprintf (str_temp, sizeof (str_temp), "%d", - (localvar_type - && (strcmp (localvar_type, "private") == 0)) ? 1 : 0); - weechat_hashtable_set (extra_vars, "tg_msg_pv", str_temp); + weechat_hashtable_set (extra_vars, "tg_notify", tags[i] + 7); + if (strcmp (tags[i] + 7, "private") == 0) + { + snprintf (str_temp, sizeof (str_temp), "%d", + (localvar_type + && (strcmp (localvar_type, "private") == 0)) ? 1 : 0); + weechat_hashtable_set (extra_vars, "tg_msg_pv", str_temp); + } } } else if (strncmp (tags[i], "nick_", 5) == 0) |