1
0
mirror of https://github.com/anope/anope.git synced 2026-06-26 03:46:39 +02:00

When using ldap/sql auth prevent displays expiring before their group.

This prevents zombie accounts from being left around that can't be
authenticated to.

Closes #355.
This commit is contained in:
Sadie Powell
2024-02-20 15:50:33 +00:00
parent ee7455daa8
commit 9649dc78a1
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -143,6 +143,15 @@ class ModuleSQLAuthentication : public Module
Log(LOG_DEBUG) << "m_sql_authentication: Checking authentication for " << req->GetAccount();
}
void OnPreNickExpire(NickAlias *na, bool &expire) anope_override
{
// We can't let nicks expire if they still have a group or
// there will be a zombie account left over that can't be
// authenticated to.
if (na->nick == na->nc->display && na->nc->aliases->size() > 1)
expire = false;
}
};
MODULE_INIT(ModuleSQLAuthentication)