summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-03-02 12:35:34 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-03-02 12:35:34 +0100
commit16c13e94a6ab5e25fdf8366891264706db566838 (patch)
treedead3e9ffc727d9a2948113227858e9dd0bd8ae2 /src
parent0329cb65f39735973257fdb99012546ac8d3fcee (diff)
downloadweechat-16c13e94a6ab5e25fdf8366891264706db566838.zip
trigger: add variable "tg_notify" (notify level of a message, if different from "none")
Diffstat (limited to 'src')
-rw-r--r--src/plugins/trigger/trigger-callback.c14
1 files changed, 9 insertions, 5 deletions
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)