From 12c67fb0e5de72c127f62a1eed6cd5e5627f3c91 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 4 Oct 2017 14:10:19 +0100 Subject: Fix RPL_SERVERVERSION treating the modes as a single parameter. --- src/mode.cpp | 4 +++- src/users.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mode.cpp b/src/mode.cpp index c4969d467..fd5e30707 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -720,7 +720,9 @@ std::string ModeParser::CreateModeList(ModeType mt, bool needparam) void ModeParser::RecreateModeListFor004Numeric() { - Cached004ModeList = CreateModeList(MODETYPE_USER) + " " + CreateModeList(MODETYPE_CHANNEL) + " " + CreateModeList(MODETYPE_CHANNEL, true); + Cached004ModeList[0] = CreateModeList(MODETYPE_USER); + Cached004ModeList[1] = CreateModeList(MODETYPE_CHANNEL); + Cached004ModeList[2] = CreateModeList(MODETYPE_CHANNEL, true); } PrefixMode* ModeParser::FindPrefix(unsigned const char pfxletter) diff --git a/src/users.cpp b/src/users.cpp index 7d72692d9..4945cbb21 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -541,8 +541,8 @@ void LocalUser::FullConnect() this->WriteNumeric(RPL_YOURHOSTIS, InspIRCd::Format("Your host is %s, running version %s", ServerInstance->Config->ServerName.c_str(), INSPIRCD_BRANCH)); this->WriteNumeric(RPL_SERVERCREATED, InspIRCd::TimeString(ServerInstance->startup_time, "This server was created %H:%M:%S %b %d %Y")); - const std::string& modelist = ServerInstance->Modes->GetModeListFor004Numeric(); - this->WriteNumeric(RPL_SERVERVERSION, ServerInstance->Config->ServerName, INSPIRCD_BRANCH, modelist); + const TR1NS::array& modelist = ServerInstance->Modes->GetModeListFor004Numeric(); + this->WriteNumeric(RPL_SERVERVERSION, ServerInstance->Config->ServerName, INSPIRCD_BRANCH, modelist[0], modelist[1], modelist[2]); ServerInstance->ISupport.SendTo(this); -- cgit v1.2.3