From 176acbfdb0fde4d6f3b808a6af80e651220b96b7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 12 Mar 2020 18:24:50 +0000 Subject: Move CHANMODES to core_mode and add USERMODES. --- src/coremods/core_mode.cpp | 6 ++++++ src/server.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/coremods/core_mode.cpp b/src/coremods/core_mode.cpp index 99dcf8638..f40d02d2e 100644 --- a/src/coremods/core_mode.cpp +++ b/src/coremods/core_mode.cpp @@ -285,6 +285,12 @@ class CoreModMode : public Module { } + void On005Numeric(std::map& tokens) CXX11_OVERRIDE + { + tokens["CHANMODES"] = ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL); + tokens["USERMODES"] = ServerInstance->Modes->GiveModeList(MODETYPE_USER); + } + Version GetVersion() CXX11_OVERRIDE { return Version("Provides the MODE command", VF_VENDOR|VF_CORE); diff --git a/src/server.cpp b/src/server.cpp index 79f2d8f4d..3a888dc4e 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -194,7 +194,6 @@ void ISupportManager::Build() tokens["AWAYLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxAway); tokens["CASEMAPPING"] = ServerInstance->Config->CaseMapping; tokens["CHANLIMIT"] = InspIRCd::Format("#:%u", ServerInstance->Config->MaxChans); - tokens["CHANMODES"] = ServerInstance->Modes->GiveModeList(MODETYPE_CHANNEL); tokens["CHANNELLEN"] = ConvToStr(ServerInstance->Config->Limits.ChanMax); tokens["CHANTYPES"] = "#"; tokens["HOSTLEN"] = ConvToStr(ServerInstance->Config->Limits.MaxHost); -- cgit v1.2.3