summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-03-04 12:08:46 +0000
committerSadie Powell <sadie@witchery.services>2024-03-04 12:10:22 +0000
commit08a35231ef00ee9dd3af80c186a78b740cd8185a (patch)
tree3f641e4cb8dfa397f2291eec9df1ed4e6391318b
parent9970b4e37b001836767de02a2dda84a8cc2db77f (diff)
parent9649dc78a1de477eae07084a737fd54841671867 (diff)
Merge branch '2.0' into 2.1.
-rw-r--r--modules/extra/ldap_authentication.cpp9
-rw-r--r--modules/extra/sql_authentication.cpp9
2 files changed, 18 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)
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)