summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2009-10-20 22:39:00 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2009-10-20 22:39:00 +0200
commit4b3d1128bf96b96322e4b99da4633f44fa49e585 (patch)
treefa379e005e9db47cad073f57e8e6b1c4fb609b6c /config.c
parent27d37093ab87c2a1b8e846b4f4df83bf19ceba4c (diff)
Parse kicks and store number of kicks and times kicked per user.
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/config.c b/config.c
index 4fdbdcb..6cc5aad 100644
--- a/config.c
+++ b/config.c
@@ -35,12 +35,12 @@ int cfg_init() {
for(int i = 0; i < regex_count; i++) {
config_setting_t *re_setting = config_setting_get_elem(regexes_setting, i);
- const char *text, *join;
- if(!(config_setting_lookup_string(re_setting, "text", &text) && config_setting_lookup_string(re_setting, "join", &join))) {
+ const char *text, *join, *kick;
+ if(!(config_setting_lookup_string(re_setting, "text", &text) && config_setting_lookup_string(re_setting, "join", &join) && config_setting_lookup_string(re_setting, "kick", &kick))) {
fprintf(stderr, "Regex set #%d missing one or more keys.\n", i+1);
return 0;
}
- if(!rs_add(text, join))
+ if(!rs_add(text, join, kick))
return 0;
}