diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-16 22:47:47 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-08-16 22:47:47 +0200 |
commit | 9105c3ba1f988c2d0103318c827f5bbd7ecbadd5 (patch) | |
tree | 1e900f03397c6463980a0f10966577306a602207 /src/plugins/trigger | |
parent | 1a0087a7d7b06b6c63653936127c4f542fc9b5b9 (diff) | |
download | weechat-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.c | 5 |
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); |