summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-06-02 17:52:32 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2010-06-02 17:52:32 +0200
commita34ddc5dd68c4530c91853507868684a9bc4b45e (patch)
treedc50334c6a8181047bf9ba0a012c3aac93719c3b /config.c
parent6dd916eaedfd23a93ba7aa2e2b39511e7e907dec (diff)
Added a minimum word length config option, "wordlen_min".
Also did some minor cleanup of the word add code in process_file.
Diffstat (limited to 'config.c')
-rw-r--r--config.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.c b/config.c
index 0ae6beb..2cb6aa6 100644
--- a/config.c
+++ b/config.c
@@ -35,6 +35,10 @@ int cfg_init() {
ircstats_config.monolog_min = 5;
}
+ if(!config_lookup_int(&config, "wordlen_min", &ircstats_config.wordlen_min)) {
+ ircstats_config.wordlen_min = 3;
+ }
+
config_setting_t *regexes_setting = config_lookup(&config, "regexes");
if(!config_setting_is_aggregate(regexes_setting)) {
fprintf(stderr, "Setting \"regexes\" must be an aggregate type.\n");