diff options
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/capab.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 1ca5b982c..f4f1e1ace 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -28,17 +28,18 @@ std::string TreeSocket::MyModules(int filter) { - std::vector<std::string> modlist = ServerInstance->Modules->GetAllModuleNames(filter); + const ModuleManager::ModuleMap& modlist = ServerInstance->Modules->GetModules(); std::string capabilities; - sort(modlist.begin(),modlist.end()); - for (std::vector<std::string>::const_iterator i = modlist.begin(); i != modlist.end(); ++i) + for (ModuleManager::ModuleMap::const_iterator i = modlist.begin(); i != modlist.end(); ++i) { + Version v = i->second->GetVersion(); + if (!(v.Flags & filter)) + continue; + if (i != modlist.begin()) capabilities.push_back(' '); - capabilities.append(*i); - Module* m = ServerInstance->Modules->Find(*i); - Version v = m->GetVersion(); + capabilities.append(i->first); if (!v.link_data.empty()) { capabilities.push_back('='); |