]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nicklock.cpp
Fix some indenting.
[user/henk/code/inspircd.git] / src / modules / m_nicklock.cpp
index 45a9d0ed4196fe05cf5dfd1b580f10ff96cda187..7f64cba597f4fa6db36dc6bee9252c511dd8bb86 100644 (file)
@@ -28,7 +28,7 @@ class CommandNicklock : public Command
                TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
        }
 
-       CmdResult Handle(const char* const* parameters, int pcnt, User *user)
+       CmdResult Handle(const std::vector<std::string>& parameters, User *user)
        {
                User* target = ServerInstance->FindNick(parameters[0]);
                irc::string server;
@@ -48,7 +48,7 @@ class CommandNicklock : public Command
                }
 
                // check nick is valid
-               if (!ServerInstance->IsNick(parameters[1]))
+               if (!ServerInstance->IsNick(parameters[1].c_str()))
                {
                        return CMD_FAILURE;
                }
@@ -56,10 +56,10 @@ class CommandNicklock : public Command
                // let others know
                ServerInstance->SNO->WriteToSnoMask('A', std::string(user->nick)+" used NICKLOCK to change and hold "+parameters[0]+" to "+parameters[1]);
 
-               if (!target->ForceNickChange(parameters[1]))
+               if (!target->ForceNickChange(parameters[1].c_str()))
                {
-                       // ugh, nickchange failed for some reason -- possibly existing nick?
-                       User::QuitUser(ServerInstance, target, "Nickname collision");
+                       // ugh, nickchange failed for some reason -- possibly existing nick? XXX change to UID here
+                       ServerInstance->Users->QuitUser(target, "Nickname collision");
                }
 
                // give them a lock flag
@@ -81,7 +81,7 @@ class CommandNickunlock : public Command
                syntax = "<locked-nick>";
        }
 
-       CmdResult Handle (const char* const* parameters, int pcnt, User *user)
+       CmdResult Handle (const std::vector<std::string>& parameters, User *user)
        {
                User* target = ServerInstance->FindNick(parameters[0]);
                if (target)
@@ -121,7 +121,7 @@ class ModuleNickLock : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1, 1, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
        }