diff options
Diffstat (limited to 'modules/extra/sql_authentication.cpp')
-rw-r--r-- | modules/extra/sql_authentication.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/extra/sql_authentication.cpp b/modules/extra/sql_authentication.cpp index bb2f82410..54307496c 100644 --- a/modules/extra/sql_authentication.cpp +++ b/modules/extra/sql_authentication.cpp @@ -145,6 +145,15 @@ public: Log(LOG_DEBUG) << "sql_authentication: Checking authentication for " << req->GetAccount(); } + + void OnPreNickExpire(NickAlias *na, bool &expire) 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) |