From 714a4a3004062b3998d5ddd8518768ac87d9a7dd Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 25 Aug 2013 21:33:52 -0400 Subject: Remove unnecesary mlock code in cs_mode, change mode set events to never bounce modes set by bots or servers, as it was possible to get modules to fight with each other --- modules/commands/cs_mode.cpp | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'modules/commands/cs_mode.cpp') diff --git a/modules/commands/cs_mode.cpp b/modules/commands/cs_mode.cpp index 7bbd2cdde..f3520dfec 100644 --- a/modules/commands/cs_mode.cpp +++ b/modules/commands/cs_mode.cpp @@ -913,36 +913,6 @@ class CSMode : public Module } } - EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override - { - if (!c->ci) - return EVENT_CONTINUE; - - ModeLocks *ml = modelocks.Get(c->ci); - if (!ml) - return EVENT_CONTINUE; - - if (ml->HasMLock(mode, param, false)) - c->RemoveMode(c->ci->WhoSends(), mode, param); - - return EVENT_CONTINUE; - } - - EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) anope_override - { - if (!c->ci) - return EVENT_CONTINUE; - - ModeLocks *ml = modelocks.Get(c->ci); - if (!ml) - return EVENT_CONTINUE; - - if (ml->HasMLock(mode, param, true)) - c->SetMode(c->ci->WhoSends(), mode, param); - - return EVENT_CONTINUE; - } - void OnCreateChan(ChannelInfo *ci) anope_override { ModeLocks *ml = modelocks.Require(ci); -- cgit