Skip to content

Commit

Permalink
libathemecore: expire unused anonymous accounts after 3 hours
Browse files Browse the repository at this point in the history
  • Loading branch information
hce authored and mweinelt committed Mar 2, 2021
1 parent c1cc4a7 commit faac44b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libathemecore/account.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit faac44b

Please sign in to comment.