summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlinuxdaemon <linuxdaemon@snoonet.org>2019-05-15 16:16:11 -0500
committerPeter Powell <petpow@saberuk.com>2019-05-15 23:10:21 +0100
commit1808a9a1b01cd6c754adaf9cf6a69038e3dddf79 (patch)
tree16f9547f90828ea534359e3574d152efb5112411 /src
parenta55ca0056963159b0e4cbc88f28c5c82cd44b05e (diff)
Fix space separation for CAPAB module list
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/capab.cpp13
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)