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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user