]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Advertise the available extbans for services.
authorSadie Powell <sadie@witchery.services>
Thu, 3 Dec 2020 02:05:45 +0000 (02:05 +0000)
committerSadie Powell <sadie@witchery.services>
Thu, 3 Dec 2020 02:05:45 +0000 (02:05 +0000)
src/modules/m_spanningtree/capab.cpp

index 15ba77a3464e8cebafc15d0f5f0170ba607d7f21..4286300e5a472c2dc9bd8c51b0871329538aef4b 100644 (file)
@@ -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<std::string, std::string> tokens;
+       FOREACH_MOD(On005Numeric, (tokens));
+       std::map<std::string, std::string>::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)+