summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-11-09 18:56:23 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-11-09 18:56:23 +0100
commitfeca811e0e0afcd67e9153522d40ae58bb468b2f (patch)
treeaf4ba172ff8877e6e9f0dfb44285afffd84ffdfd /config.c
parent91e5543757dad266f041f46d11bf973966368a30 (diff)
Modified time branch to store only first and last time seen.
Diffstat (limited to 'config.c')
-rw-r--r--config.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.c b/config.c
index e710e83..19a427a 100644
--- a/config.c
+++ b/config.c
@@ -65,11 +65,15 @@ int cfg_init() {
&& config_setting_lookup_string(re_setting, "kick", &kick)
&& config_setting_lookup_string(re_setting, "nick_changed", &nick_changed)
&& config_setting_lookup_string(re_setting, "log_opened", &log_opened)
- && config_setting_lookup_string(re_setting, "day_changed", &day_changed)
)) {
fprintf(stderr, "Regex set #%d missing one or more keys.\n", i+1);
return 0;
}
+
+ if(!config_setting_lookup_string(re_setting, "day_changed", &day_changed)) {
+ day_changed = NULL;
+ }
+
if(!config_setting_lookup_string(re_setting, "log_date_format", &log_date_format))
log_date_format = NULL;
if(!config_setting_lookup_string(re_setting, "day_date_format", &day_date_format))