From 029513973c396700d13f20b81d32ef345f1bdc2e Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sun, 2 Jul 2023 15:57:31 +0100 Subject: Make the globops module optcommon, remove the GLOBOPS capab key. --- src/modules/m_spanningtree/capab.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/modules/m_spanningtree/capab.cpp') diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 1db1998ac..00bf0355b 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -65,6 +65,10 @@ namespace modname = "m_services_account.so"; else if (stdalgo::string::equalsci(modname, "m_services.so")) modname = "m_svshold.so"; + + // Handle modules with changed properties. + else if (stdalgo::string::equalsci(modname, "m_globops.so")) + continue; // This module was made VF_OPTCOMMON in v4. } else { @@ -369,6 +373,12 @@ void TreeSocket::SendCapabilities(int phase) capabilities["CHANMAX"] = capabilities["MAXCHANNEL"]; capabilities["IDENTMAX"] = capabilities["MAXUSER"]; capabilities["NICKMAX"] = capabilities["MAXNICK"]; + + // Advertise the presence or absence of the globops snomask in CAPAB CAPABILITIES. Services + // needs to know about it and since m_globops is not marked as VF_(OPT)COMMON in v3 we + // advertise it here to not break linking to previous versions. + capabilities["GLOBOPS"] = ConvToStr(!!ServerInstance->Modules.Find("globops")); + } else { @@ -384,11 +394,6 @@ void TreeSocket::SendCapabilities(int phase) capabilities["CHALLENGE"] = GetOurChallenge(); } - // Advertise the presence or absence of the globops snomask in CAPAB CAPABILITIES. Services - // needs to know about it and since m_globops is not marked as VF_(OPT)COMMON we advertise it - // here to not break linking to previous versions. - capabilities["GLOBOPS"] = ConvToStr(!!ServerInstance->Modules.Find("globops")); - std::stringstream capabilitystr; char separator = ':'; for (const auto& [capkey, capvalue] : capabilities) -- cgit v1.3.1-10-gc9f91