From faac44b5a5e38f99eee17f74fd89559d60f4b086 Mon Sep 17 00:00:00 2001 From: Hans-Christian Esperer Date: Thu, 6 Aug 2015 00:40:58 +0200 Subject: [PATCH] libathemecore: expire unused anonymous accounts after 3 hours --- libathemecore/account.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libathemecore/account.c b/libathemecore/account.c index 80233ade2..19262f613 100644 --- a/libathemecore/account.c +++ b/libathemecore/account.c @@ -1974,7 +1974,9 @@ static int expire_myuser_cb(myentity_t *mt, void *unused) return 0; if ((nicksvs.expiry > 0 && mu->lastlogin < CURRTIME && (unsigned int)(CURRTIME - mu->lastlogin) >= nicksvs.expiry) || - (mu->flags & MU_WAITAUTH && CURRTIME - mu->registered >= 86400)) + (mu->flags & MU_WAITAUTH && CURRTIME - mu->registered >= 86400) || + /* Expire unused anonymous accounts after 3 hours */ + ((mu->lastlogin - mu->registered < 5) && (CURRTIME - mu->registered >= 10800))) { /* Don't expire accounts with privs on them in atheme.conf, * otherwise someone can reregister