diff options
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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)) |