diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-01-26 20:07:28 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-01-26 20:07:28 +0000 |
commit | 0dac2dbc49bf13cb42bdac84fd1780d0ba63f4aa (patch) | |
tree | 177a89b40ff26b2abf06fd200432e9bde0aedc6b /src | |
parent | 422197c87ba8cd9de5c75b442c116f0790dc9070 (diff) |
Check noexpire/readonly in expire_all(), not the mainloop. Otherwise, expiry will happen on shutdown.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1935 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c index 2ec387196..30cbbdc11 100644 --- a/src/main.c +++ b/src/main.c @@ -100,6 +100,12 @@ static int started = 0; extern void expire_all() { + if (noexpire || readonly) + { + // Definitely *do not* want. + return; + } + waiting = -30; send_event(EVENT_DB_EXPIRE, 1, EVENT_START); waiting = -3; @@ -542,8 +548,9 @@ int main(int ac, char **av, char **envp) if (debug >= 2) alog("debug: Top of main loop"); - if (!noexpire && !readonly - && (save_data || t - last_expire >= ExpireTimeout)) { + // Never fear. noexpire/readonly are checked in expire_all(). + if (save_data || t - last_expire >= ExpireTimeout) + { expire_all(); last_expire = t; } |