aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_operchans.cpp
diff options
context:
space:
mode:
authorGravatar danieldg2009-09-13 20:33:11 +0000
committerGravatar danieldg2009-09-13 20:33:11 +0000
commit2d732f4dbf4ccd22c8a4424692cc72a89ffd49b7 (patch)
treefb1ff3f341b5ee7e801ad7ad00216a40ca131ede /src/modules/m_operchans.cpp
parentPrevent <include:executable> from running <include:executable> itself [jackmc... (diff)
Change match direction of extbans to allow stacking
This allows you create stacked bans like: +b m:r:*bot* to mute anyone with bot in their gecos +e S:j:+#staff to allow voices in #staff to use color It also deprecates extban M, which can be implemented using m:R: git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11711 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_operchans.cpp')
-rw-r--r--src/modules/m_operchans.cpp18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/modules/m_operchans.cpp b/src/modules/m_operchans.cpp
index d97142e66..32d54bce7 100644
--- a/src/modules/m_operchans.cpp
+++ b/src/modules/m_operchans.cpp
@@ -46,7 +46,6 @@ class OperChans : public ModeHandler
class ModuleOperChans : public Module
{
-
OperChans oc;
public:
ModuleOperChans(InspIRCd* Me)
@@ -54,11 +53,10 @@ class ModuleOperChans : public Module
{
if (!ServerInstance->Modes->AddMode(&oc))
throw ModuleException("Could not add new modes!");
- Implementation eventlist[] = { I_OnCheckBan, I_OnUserPreJoin };
- ServerInstance->Modules->Attach(eventlist, this, 2);
+ ServerInstance->Modules->Attach(I_OnUserPreJoin, this);
}
- virtual ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
+ ModResult OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
{
if (chan && chan->IsModeSet('O') && !IS_OPER(user))
{
@@ -69,20 +67,12 @@ class ModuleOperChans : public Module
return MOD_RES_PASSTHRU;
}
- virtual ModResult OnCheckBan(User* user, Channel* chan)
- {
- if (IS_OPER(user))
- return chan->GetExtBanStatus(user->oper, 'O');
-
- return MOD_RES_PASSTHRU;
- }
-
- virtual ~ModuleOperChans()
+ ~ModuleOperChans()
{
ServerInstance->Modes->DelMode(&oc);
}
- virtual Version GetVersion()
+ Version GetVersion()
{
return Version("$Id$", VF_VENDOR | VF_COMMON, API_VERSION);
}