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

Skip deprecated modules when checking for a database/encryption backend.

This commit is contained in:
Sadie Powell
2025-08-08 14:12:56 +01:00
parent d15b8ee949
commit 003cb55409
3 changed files with 9 additions and 6 deletions
+5 -2
View File
@@ -262,11 +262,14 @@ Module *ModuleManager::FindModule(const Anope::string &name)
return NULL;
}
Module *ModuleManager::FindFirstOf(ModType type, Module *ignore)
Module *ModuleManager::FindFirstOf(ModType type, bool ignoredeprecated)
{
for (auto *m : Modules)
{
if (m->type & type && m != ignore)
if (ignoredeprecated && (m->type & DEPRECATED))
continue;
if (m->type & type)
return m;
}