]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setident.cpp
core_hostname_lookup: find answer record of the correct type instead of assuming...
[user/henk/code/inspircd.git] / src / modules / m_setident.cpp
index f3592ae4647accdaf672085604fdf2f661607107..93dd4c332bb2f97a4c1cd158feb5c3091562ea8d 100644 (file)
@@ -22,8 +22,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for the SETIDENT command */
-
 /** Handle /SETIDENT
  */
 class CommandSetident : public Command
@@ -33,24 +31,23 @@ class CommandSetident : public Command
        {
                allow_empty_last_param = false;
                flags_needed = 'o'; syntax = "<new-ident>";
-               TRANSLATE2(TR_TEXT, TR_END);
        }
 
        CmdResult Handle(const std::vector<std::string>& parameters, User *user)
        {
                if (parameters[0].size() > ServerInstance->Config->Limits.IdentMax)
                {
-                       user->WriteServ("NOTICE %s :*** SETIDENT: Ident is too long", user->nick.c_str());
+                       user->WriteNotice("*** SETIDENT: Ident is too long");
                        return CMD_FAILURE;
                }
 
-               if (!ServerInstance->IsIdent(parameters[0].c_str()))
+               if (!ServerInstance->IsIdent(parameters[0]))
                {
-                       user->WriteServ("NOTICE %s :*** SETIDENT: Invalid characters in ident", user->nick.c_str());
+                       user->WriteNotice("*** SETIDENT: Invalid characters in ident");
                        return CMD_FAILURE;
                }
 
-               user->ChangeIdent(parameters[0].c_str());
+               user->ChangeIdent(parameters[0]);
                ServerInstance->SNO->WriteGlobalSno('a', "%s used SETIDENT to change their ident to '%s'", user->nick.c_str(), user->ident.c_str());
 
                return CMD_SUCCESS;
@@ -66,12 +63,7 @@ class ModuleSetIdent : public Module
        {
        }
 
-       void init()
-       {
-               ServerInstance->Modules->AddService(cmd);
-       }
-
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides support for the SETIDENT command", VF_VENDOR);
        }