diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/capab.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index ed94079ae..39564480d 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -67,8 +67,7 @@ std::string TreeSocket::MyModules(int filter) if ((!do_compat_include) && (!(v.Flags & filter))) continue; - if (i != modlist.begin()) - capabilities.push_back(' '); + capabilities.push_back(' '); capabilities.append(i->first); if (!v.link_data.empty()) { @@ -80,12 +79,12 @@ std::string TreeSocket::MyModules(int filter) // If we are linked in a 2.0 server and have an ascii casemapping // advertise it as m_ascii.so from inspircd-extras if ((filter & VF_COMMON) && ServerInstance->Config->CaseMapping == "ascii" && proto_version == PROTO_INSPIRCD_20) - { - if (!capabilities.empty()) - capabilities += "m_ascii.so"; - } + capabilities.append(" m_ascii.so"); + + if (capabilities.empty()) + return capabilities; - return capabilities; + return capabilities.substr(1); } std::string TreeSocket::BuildModeList(ModeType mtype) |