X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e6a35d1c2786c91fb64ac2bbe71bdf7662687007..eb5f83f45eb2ff415ededbb30187fec8c3e71010:/lib/configuration.c diff --git a/lib/configuration.c b/lib/configuration.c index 3cf276e..869f895 100644 --- a/lib/configuration.c +++ b/lib/configuration.c @@ -1,6 +1,6 @@ /* * This file is part of DisOrder. - * Copyright (C) 2004, 2005, 2006, 2007 Richard Kettlewell + * Copyright (C) 2004-2008 Richard Kettlewell * Portions copyright (C) 2007 Mark Wooding * * This program is free software; you can redistribute it and/or modify @@ -946,6 +946,7 @@ static const struct conf conf[] = { { C(multicast_loop), &type_boolean, validate_any }, { C(multicast_ttl), &type_integer, validate_non_negative }, { C(namepart), &type_namepart, validate_any }, + { C(new_max), &type_integer, validate_positive }, { C2(nice, nice_rescan), &type_integer, validate_non_negative }, { C(nice_rescan), &type_integer, validate_non_negative }, { C(nice_server), &type_integer, validate_any }, @@ -957,6 +958,7 @@ static const struct conf conf[] = { { C(prefsync), &type_integer, validate_positive }, { C(queue_pad), &type_integer, validate_positive }, { C(refresh), &type_integer, validate_positive }, + { C(reminder_interval), &type_integer, validate_positive }, { C2(restrict, restrictions), &type_restrict, validate_any }, { C(sample_format), &type_sample_format, validate_sample_format }, { C(scratch), &type_string_accum, validate_isreg }, @@ -1188,6 +1190,8 @@ static struct config *config_default(void) { c->cookie_login_lifetime = 86400; c->cookie_key_lifetime = 86400 * 7; c->smtp_server = xstrdup("127.0.0.1"); + c->new_max = 100; + c->reminder_interval = 600; /* 10m */ /* Default stopwords */ if(config_set(&cs, (int)NDEFAULT_STOPWORDS, (char **)default_stopwords)) exit(1); @@ -1357,7 +1361,7 @@ int config_read(int server) { return -1; xfree(privconf); /* if we have a password file, read it */ - if((privconf = config_userconf(getenv("HOME"), pw)) + if((privconf = config_userconf(0, pw)) && access(privconf, F_OK) == 0 && config_include(c, privconf)) return -1;