summaryrefslogtreecommitdiff
path: root/src/plugins/trigger/trigger.h
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-01-26 19:59:55 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-09 12:55:40 +0100
commitbe8e32dd1bea00c9e9ab0c728b9089f126ca7834 (patch)
treea168d114d32c3bd200212e5aa5eb47275a3780f3 /src/plugins/trigger/trigger.h
parentbcff9162a75d0d12457c56f3ce2a7f68d8a2b9d4 (diff)
downloadweechat-be8e32dd1bea00c9e9ab0c728b9089f126ca7834.zip
trigger: add support of variable in regex option
Examples with new format: /regex/text/ /regex/text/var /regex1/text1/ /regex2/text2/ /regex1/text1/var /regex2/text2/var
Diffstat (limited to 'src/plugins/trigger/trigger.h')
-rw-r--r--src/plugins/trigger/trigger.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/trigger/trigger.h b/src/plugins/trigger/trigger.h
index 8b3cffc51..ed7a05b54 100644
--- a/src/plugins/trigger/trigger.h
+++ b/src/plugins/trigger/trigger.h
@@ -60,6 +60,7 @@ enum t_trigger_return_code
struct t_trigger_regex
{
+ char *variable; /* the hashtable key used */
char *str_regex; /* regex to search for replacement */
regex_t *regex; /* compiled regex */
char *replace; /* replacement text */
@@ -75,8 +76,8 @@ struct t_trigger
/* internal vars */
/* regular expressions with their replacement text */
- int regex_count; /* number of regex/replacement */
- struct t_trigger_regex *regex; /* array of regex/replacement */
+ int regex_count; /* number of regex */
+ struct t_trigger_regex *regex; /* array of regex */
/* hooks */
int hooks_count; /* number of hooks */
@@ -95,6 +96,7 @@ extern struct t_weechat_plugin *weechat_trigger_plugin;
extern char *trigger_option_string[];
extern char *trigger_option_default[];
extern char *trigger_hook_type_string[];
+extern char *trigger_hook_regex_default_var[];
extern int trigger_return_code[];
extern struct t_trigger *triggers;
extern struct t_trigger *last_trigger;