]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_override.cpp
fix some unitialised vectors and tidy up a bit.
[user/henk/code/inspircd.git] / src / modules / m_override.cpp
index a879515f2b63f39ccf53464111fbe9aa598f3a6d..054d56a4b1d4be9238deb4e2103a0675c064e95f 100644 (file)
@@ -63,7 +63,7 @@ class ModuleOverride : public Module
        }
 
 
-       virtual void OnPostCommand(const std::string &command, const char* const* parameters, int pcnt, User *user, CmdResult result, const std::string &original_line)
+       virtual void OnPostCommand(const std::string &command, const std::vector<std::string> &parameters, User *user, CmdResult result, const std::string &original_line)
        {
                if ((NoisyOverride) && (OverriddenMode) && (irc::string(command.c_str()) == "MODE") && (result == CMD_SUCCESS))
                {
@@ -242,13 +242,13 @@ class ModuleOverride : public Module
                                                if (RequireKey && keygiven != "override")
                                                {
                                                        // Can't join normally -- must use a special key to bypass restrictions
-                                                       user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper-override.");
+                                                       user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
                                                        return 1;
                                                }
 
                                                if (NoisyOverride)
-                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass invite-only", cname, user->nick);
-                                               ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +i on "+std::string(cname));
+                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass invite-only", cname, user->nick);
+                                               ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +i on "+std::string(cname));
                                        }
                                        return -1;
                                }
@@ -258,13 +258,13 @@ class ModuleOverride : public Module
                                        if (RequireKey && keygiven != "override")
                                        {
                                                // Can't join normally -- must use a special key to bypass restrictions
-                                               user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper-override.");
+                                               user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
                                                return 1;
                                        }
 
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel key", cname, user->nick);
-                                       ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +k on "+std::string(cname));
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel key", cname, user->nick);
+                                       ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +k on "+std::string(cname));
                                        return -1;
                                }
                                        
@@ -273,13 +273,13 @@ class ModuleOverride : public Module
                                        if (RequireKey && keygiven != "override")
                                        {
                                                // Can't join normally -- must use a special key to bypass restrictions
-                                               user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper-override.");
+                                               user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
                                                return 1;
                                        }
 
                                        if (NoisyOverride)
-                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass the channel limit", cname, user->nick);
-                                       ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used operoverride to bypass +l on "+std::string(cname));
+                                               chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass the channel limit", cname, user->nick);
+                                       ServerInstance->SNO->WriteToSnoMask('O',std::string(user->nick)+" used oper override to bypass +l on "+std::string(cname));
                                        return -1;
                                }
 
@@ -290,13 +290,13 @@ class ModuleOverride : public Module
                                                if (RequireKey && keygiven != "override")
                                                {
                                                        // Can't join normally -- must use a special key to bypass restrictions
-                                                       user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper-override.");
+                                                       user->WriteServ("NOTICE %s :*** You may not join normally. You must join with a key of 'override' to oper override.", user->nick);
                                                        return 1;
                                                }
 
                                                if (NoisyOverride)
-                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper-override to bypass channel ban", cname, user->nick);
-                                               ServerInstance->SNO->WriteToSnoMask('O',"%s used oper-override to bypass channel ban on %s", user->nick, cname);
+                                                       chan->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s used oper override to bypass channel ban", cname, user->nick);
+                                               ServerInstance->SNO->WriteToSnoMask('O',"%s used oper override to bypass channel ban on %s", user->nick, cname);
                                        }
                                        return -1;
                                }