1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 08:13:14 +02:00

trigger: add variable "tg_notify" (notify level of a message, if different from "none")

This commit is contained in:
Sebastien Helleu
2014-03-02 12:35:34 +01:00
parent 0329cb65f3
commit 16c13e94a6
7 changed files with 21 additions and 11 deletions
+9 -5
View File
@@ -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)