inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 1808a9a1b01cd6c754adaf9cf6a69038e3dddf79
parent a55ca0056963159b0e4cbc88f28c5c82cd44b05e
Author: linuxdaemon <linuxdaemon@snoonet.org>
Date:   Wed, 15 May 2019 16:16:11 -0500

Fix space separation for CAPAB module list

Diffstat:
Msrc/modules/m_spanningtree/capab.cpp | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git 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)