]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_override.cpp
m_ssl_openssl Fix inverted check that prevented certificates from being recognized...
[user/henk/code/inspircd.git] / src / modules / m_override.cpp
index c7b3657905cd19b58fbf0088905091b3fbf73280..1d9447fc46a1679c4a4d34a4da062007bd9e3a0c 100644 (file)
@@ -35,13 +35,13 @@ class ModuleOverride : public Module
 
  public:
 
-       ModuleOverride()
-                       {
+       void init()
+       {
                // read our config options (main config file)
                OnRehash(NULL);
                ServerInstance->SNO->EnableSnomask('v', "OVERRIDE");
                Implementation eventlist[] = { I_OnRehash, I_OnPreMode, I_On005Numeric, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange };
-               ServerInstance->Modules->Attach(eventlist, this, 6);
+               ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
        void OnRehash(User* user)
@@ -135,7 +135,7 @@ class ModuleOverride : public Module
                                                }
 
                                                if (NoisyOverride)
-                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str());
+                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick.c_str());
                                                ServerInstance->SNO->WriteGlobalSno('v', user->nick+" used oper override to bypass +i on "+std::string(cname));
                                        }
                                        return MOD_RES_ALLOW;
@@ -151,7 +151,7 @@ class ModuleOverride : public Module
                                        }
 
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str());
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick.c_str());
                                        ServerInstance->SNO->WriteGlobalSno('v', user->nick+" used oper override to bypass +k on "+std::string(cname));
                                        return MOD_RES_ALLOW;
                                }
@@ -166,7 +166,7 @@ class ModuleOverride : public Module
                                        }
 
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str());
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick.c_str());
                                        ServerInstance->SNO->WriteGlobalSno('v', user->nick+" used oper override to bypass +l on "+std::string(cname));
                                        return MOD_RES_ALLOW;
                                }
@@ -181,7 +181,7 @@ class ModuleOverride : public Module
                                        }
 
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName.c_str(), "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick.c_str());
                                        ServerInstance->SNO->WriteGlobalSno('v',"%s used oper override to bypass channel ban on %s", user->nick.c_str(), cname);
                                        return MOD_RES_ALLOW;
                                }