]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_override.cpp
Wahhhhhhhhhhhh bwahahaha. Mass commit to tidy up tons of messy include lists
[user/henk/code/inspircd.git] / src / modules / m_override.cpp
index c65a992e7ad45d6d04858c65e907d1a658f84641..b0143ea4522269714387f34ff6a5128f702f9e32 100644 (file)
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "helperfuncs.h"
 #include "configreader.h"
 #include "inspircd.h"
 
 /* $ModDesc: Provides support for unreal-style oper-override */
 
-
-
 typedef std::map<std::string,std::string> override_t;
 
 class ModuleOverride : public Module
@@ -36,13 +33,7 @@ class ModuleOverride : public Module
  
        ModuleOverride(InspIRCd* Me)
                : Module::Module(Me)
-       {
-       
-               // here we initialise our module. Use new to create new instances of the required
-               // classes.
-               
-               
-               
+       {               
                // read our config options (main config file)
                OnRehash("");
        }
@@ -213,7 +204,7 @@ class ModuleOverride : public Module
                                                if (!user->IsInvited(x))
                                                {
                                                        /* XXX - Ugly cast for a parameter that isn't used? :< - Om */
-                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s invited himself into the channel", cname, user->nick);
+                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass invite-only", cname, user->nick);
                                                }
                                        }
                                        ServerInstance->WriteOpers("*** "+std::string(user->nick)+" used operoverride to bypass +i on "+std::string(cname));
@@ -223,7 +214,7 @@ class ModuleOverride : public Module
                                if ((chan->key[0]) && (CanOverride(user,"KEY")))
                                {
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s bypassed the channel key", cname, user->nick);
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel key", cname, user->nick);
                                        ServerInstance->WriteOpers("*** "+std::string(user->nick)+" used operoverride to bypass +k on "+std::string(cname));
                                        return -1;
                                }
@@ -231,7 +222,7 @@ class ModuleOverride : public Module
                                if ((chan->limit > 0) && (chan->GetUserCounter() >=  chan->limit) && (CanOverride(user,"LIMIT")))
                                {
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s passed through your channel limit", cname, user->nick);
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel limit", cname, user->nick);
                                        ServerInstance->WriteOpers("*** "+std::string(user->nick)+" used operoverride to bypass +l on "+std::string(cname));
                                        return -1;
                                }
@@ -239,6 +230,8 @@ class ModuleOverride : public Module
                                if (CanOverride(user,"BANWALK"))
                                {
                                        // other join
+                                       if (NoisyOverride)
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass channel bans", cname, user->nick);
                                        return -1;
                                }
                        }