From a34ddc5dd68c4530c91853507868684a9bc4b45e Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 2 Jun 2010 17:52:32 +0200 Subject: Added a minimum word length config option, "wordlen_min". Also did some minor cleanup of the word add code in process_file. --- config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'config.c') 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"); -- cgit v1.2.3