]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nicklock.cpp
m_spanningtree Remove duplicate code for sending channel messages from RouteCommand()
[user/henk/code/inspircd.git] / src / modules / m_nicklock.cpp
index 9da40ce7802e4a2a66f2441ae18a870d2ea31064..6c4101bc5fe4b7e7df359d2c1b905dea3b53ca55 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides the NICKLOCK command, allows an oper to change a users nick and lock them to it until they quit */
-
 /** Handle /NICKLOCK
  */
 class CommandNicklock : public Command
@@ -35,7 +33,7 @@ class CommandNicklock : public Command
        {
                flags_needed = 'o';
                syntax = "<oldnick> <newnick>";
-               TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+               TRANSLATE2(TR_NICK, TR_TEXT);
        }
 
        CmdResult Handle(const std::vector<std::string>& parameters, User *user)
@@ -98,7 +96,7 @@ class CommandNickunlock : public Command
        {
                flags_needed = 'o';
                syntax = "<locked-nick>";
-               TRANSLATE2(TR_NICK, TR_END);
+               TRANSLATE1(TR_NICK);
        }
 
        CmdResult Handle (const std::vector<std::string>& parameters, User *user)
@@ -155,7 +153,6 @@ class ModuleNickLock : public Module
                ServerInstance->Modules->AddService(cmd1);
                ServerInstance->Modules->AddService(cmd2);
                ServerInstance->Modules->AddService(locked);
-               ServerInstance->Modules->Attach(I_OnUserPreNick, this);
        }
 
        Version GetVersion() CXX11_OVERRIDE
@@ -179,7 +176,7 @@ class ModuleNickLock : public Module
        void Prioritize()
        {
                Module *nflood = ServerInstance->Modules->Find("m_nickflood.so");
-               ServerInstance->Modules->SetPriority(this, I_OnUserPreJoin, PRIORITY_BEFORE, &nflood);
+               ServerInstance->Modules->SetPriority(this, I_OnUserPreNick, PRIORITY_BEFORE, &nflood);
        }
 };