]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_nicklock.cpp
Tidy up keywords on module methods.
[user/henk/code/inspircd.git] / src / modules / m_nicklock.cpp
index b5564f21596f5725bae4bdd7aa3807f804d3e2ad..a6178fc5a9fd61ca881461ee09551ad284ce532d 100644 (file)
@@ -44,7 +44,7 @@ class CommandNicklock : public Command
 
                if ((!target) || (target->registered != REG_ALL))
                {
-                       user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick.c_str(), parameters[0].c_str());
+                       user->WriteNotice("*** No such nickname: '" + parameters[0] + "'");
                        return CMD_FAILURE;
                }
 
@@ -53,7 +53,7 @@ class CommandNicklock : public Command
                {
                        if (!ServerInstance->IsNick(parameters[1], ServerInstance->Config->Limits.NickMax))
                        {
-                               user->WriteServ("NOTICE %s :*** Invalid nickname '%s'", user->nick.c_str(), parameters[1].c_str());
+                               user->WriteNotice("*** Invalid nickname '" + parameters[1] + "'");
                                return CMD_FAILURE;
                        }
 
@@ -107,7 +107,7 @@ class CommandNickunlock : public Command
 
                if (!target)
                {
-                       user->WriteServ("NOTICE %s :*** No such nickname: '%s'", user->nick.c_str(), parameters[0].c_str());
+                       user->WriteNotice("*** No such nickname: '" + parameters[0] + "'");
                        return CMD_FAILURE;
                }
 
@@ -139,7 +139,6 @@ class CommandNickunlock : public Command
        }
 };
 
-
 class ModuleNickLock : public Module
 {
        LocalIntExt locked;
@@ -151,7 +150,7 @@ class ModuleNickLock : public Module
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(cmd1);
                ServerInstance->Modules->AddService(cmd2);
@@ -159,16 +158,12 @@ class ModuleNickLock : public Module
                ServerInstance->Modules->Attach(I_OnUserPreNick, this);
        }
 
-       ~ModuleNickLock()
-       {
-       }
-
-       Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides the NICKLOCK command, allows an oper to change a users nick and lock them to it until they quit", VF_OPTCOMMON | VF_VENDOR);
        }
 
-       ModResult OnUserPreNick(User* user, const std::string &newnick)
+       ModResult OnUserPreNick(User* user, const std::string &newnick) CXX11_OVERRIDE
        {
                if (!IS_LOCAL(user))
                        return MOD_RES_PASSTHRU;