diff options
author | attilamolnar <attilamolnar@hush.com> | 2013-08-16 12:20:06 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2013-08-30 13:15:10 +0200 |
commit | d349f981fbe70fb11e3db4c486f59749ffe74c2b (patch) | |
tree | 8de831914936c0af823fb4969193e58481275a48 /src/modules/m_spanningtree | |
parent | c202dea024542b9c6c6b771bb9a3a081d9eacdc5 (diff) |
Remove ModuleManager::GetAllModuleNames(), use GetModules() instead
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('='); |