summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_override.cpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/modules/m_override.cpp b/src/modules/m_override.cpp
index f92bb9899..f73cd2aa3 100644
--- a/src/modules/m_override.cpp
+++ b/src/modules/m_override.cpp
@@ -198,25 +198,27 @@ class ModuleOverride : public Module
Srv->SendOpers("*** "+std::string(user->nick)+" used operoverride to bypass +i on "+std::string(cname));
return -1;
}
- if ((chan->key[0]) && (CanOverride(user,"KEY")))
- {
- if (NoisyOverride)
- WriteChannelWithServ((char*)Srv->GetServerName().c_str(),chan,"NOTICE %s :%s bypassed the channel key",cname,user->nick);
- Srv->SendOpers("*** "+std::string(user->nick)+" used operoverride to bypass +k on "+std::string(cname));
+
+ if ((chan->key[0]) && (CanOverride(user,"KEY")))
+ {
+ if (NoisyOverride)
+ WriteChannelWithServ((char*)Srv->GetServerName().c_str(),chan,"NOTICE %s :%s bypassed the channel key",cname,user->nick);
+ Srv->SendOpers("*** "+std::string(user->nick)+" used operoverride to bypass +k on "+std::string(cname));
return -1;
- }
- if ((chan->limit >= Srv->CountUsers(chan)) && (CanOverride(user,"LIMIT")))
- {
- if (NoisyOverride)
- WriteChannelWithServ((char*)Srv->GetServerName().c_str(),chan,"NOTICE %s :%s passed through your channel limit",cname,user->nick);
- Srv->SendOpers("*** "+std::string(user->nick)+" used operoverride to bypass +l on "+std::string(cname));
+ }
+
+ if ((Srv->CountUsers(chan) >= chan->limit) && (CanOverride(user,"LIMIT")))
+ {
+ if (NoisyOverride)
+ WriteChannelWithServ((char*)Srv->GetServerName().c_str(),chan,"NOTICE %s :%s passed through your channel limit",cname,user->nick);
+ Srv->SendOpers("*** "+std::string(user->nick)+" used operoverride to bypass +l on "+std::string(cname));
return -1;
- }
+ }
if (CanOverride(user,"BANWALK"))
{
// other join
- return -1;
+ return -1;
}
}
}
@@ -258,4 +260,3 @@ extern "C" void * init_module( void )
{
return new ModuleOverrideFactory;
}
-