summaryrefslogtreecommitdiff
path: root/src/plugins/trigger
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-08-16 22:47:47 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-08-16 22:47:47 +0200
commit9105c3ba1f988c2d0103318c827f5bbd7ecbadd5 (patch)
tree1e900f03397c6463980a0f10966577306a602207 /src/plugins/trigger
parent1a0087a7d7b06b6c63653936127c4f542fc9b5b9 (diff)
downloadweechat-9105c3ba1f988c2d0103318c827f5bbd7ecbadd5.zip
trigger: allow creation of temporary variables with the regex
Diffstat (limited to 'src/plugins/trigger')
-rw-r--r--src/plugins/trigger/trigger-callback.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c
index 88454ac50..d77f15a7d 100644
--- a/src/plugins/trigger/trigger-callback.c
+++ b/src/plugins/trigger/trigger-callback.c
@@ -277,9 +277,10 @@ trigger_callback_replace_regex (struct t_trigger *trigger,
{
weechat_printf_date_tags (trigger_buffer, 0, "no_trigger",
"\t regex %d (%s): %s",
- i + 1, ptr_key, _("empty variable"));
+ i + 1, ptr_key, _("creating variable"));
}
- continue;
+ weechat_hashtable_set (extra_vars, ptr_key, "");
+ ptr_value = weechat_hashtable_get (extra_vars, ptr_key);
}
weechat_hashtable_set (pointers, "regex", trigger->regex[i].regex);