From fe67c13ddf8f546bed95a9904679b3f32c708cd9 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 3 Dec 2020 02:05:45 +0000 Subject: Advertise the available extbans for services. --- src/modules/m_spanningtree/capab.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 15ba77a34..4286300e5 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -199,6 +199,14 @@ void TreeSocket::SendCapabilities(int phase) .append(" PREFIX="+ ServerInstance->Modes->BuildPrefixes()); } + // HACK: Allow services to know what extbans exist. This will be + // replaced by CAPAB EXTBANS in the next protocol version. + std::map tokens; + FOREACH_MOD(On005Numeric, (tokens)); + std::map::const_iterator eiter = tokens.find("EXTBAN"); + if (eiter != tokens.end()) + extra.append(" EXTBANS=" + eiter->second); + this->WriteLine("CAPAB CAPABILITIES " /* Preprocessor does this one. */ ":NICKMAX="+ConvToStr(ServerInstance->Config->Limits.NickMax)+ " CHANMAX="+ConvToStr(ServerInstance->Config->Limits.ChanMax)+ -- cgit v1.2.3