From 1808a9a1b01cd6c754adaf9cf6a69038e3dddf79 Mon Sep 17 00:00:00 2001 From: linuxdaemon Date: Wed, 15 May 2019 16:16:11 -0500 Subject: Fix space separation for CAPAB module list --- src/modules/m_spanningtree/capab.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src') 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) -- cgit v1.2.3