summaryrefslogtreecommitdiff
path: root/modules/extra/ldap_authentication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/ldap_authentication.cpp')
-rw-r--r--modules/extra/ldap_authentication.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/extra/ldap_authentication.cpp b/modules/extra/ldap_authentication.cpp
index c78d2ae25..3896bd1a2 100644
--- a/modules/extra/ldap_authentication.cpp
+++ b/modules/extra/ldap_authentication.cpp
@@ -303,6 +303,15 @@ public:
Anope::string new_dn = username_attribute + "=" + na->nick + "," + basedn;
this->ldap->Add(&this->orinterface, new_dn, attributes);
}
+
+ 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(ModuleLDAPAuthentication)