From 802eed1734cf20e9a2549a5fe343d04c34e83a10 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 31 Mar 2018 13:02:57 +0100 Subject: Move to core_channel. --- src/coremods/core_channel/core_channel.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/coremods/core_channel/core_channel.cpp') diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp index a49f8492d..b69483166 100644 --- a/src/coremods/core_channel/core_channel.cpp +++ b/src/coremods/core_channel/core_channel.cpp @@ -105,6 +105,19 @@ class CoreModChannel : public Module, public CheckExemption::EventListener } exemptions.swap(exempts); + ConfigTag* securitytag = ServerInstance->Config->ConfValue("security"); + const std::string announceinvites = securitytag->getString("announceinvites", "dynamic"); + if (stdalgo::string::equalsci(announceinvites, "none")) + cmdinvite.announceinvites = Invite::ANNOUNCE_NONE; + else if (stdalgo::string::equalsci(announceinvites, "all")) + cmdinvite.announceinvites = Invite::ANNOUNCE_ALL; + else if (stdalgo::string::equalsci(announceinvites, "ops")) + cmdinvite.announceinvites = Invite::ANNOUNCE_OPS; + else if (stdalgo::string::equalsci(announceinvites, "dynamic")) + cmdinvite.announceinvites = Invite::ANNOUNCE_DYNAMIC; + else + throw ModuleException(announceinvites + " is an invalid value, at " + securitytag->getTagLocation()); + // In 2.0 we allowed limits of 0 to be set. This is non-standard behaviour // and will be removed in the next major release. limitmode.minlimit = optionstag->getBool("allowzerolimit", true) ? 0 : 1; -- cgit v1.2.3