]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgname.cpp
m_spanningtree Remove SpanningTreeUtilities* fields and parameters
[user/henk/code/inspircd.git] / src / modules / m_chgname.cpp
index b336e97cf9fe0ec25060529a862237348e81d3ff..efcce15902c1e6f45706a306945e6a126bf4860f 100644 (file)
@@ -20,8 +20,6 @@
 
 #include "inspircd.h"
 
-/* $ModDesc: Provides support for the CHGNAME command */
-
 /** Handle /CHGNAME
  */
 class CommandChgname : public Command
@@ -32,7 +30,7 @@ class CommandChgname : public Command
                allow_empty_last_param = false;
                flags_needed = 'o';
                syntax = "<nick> <newname>";
-               TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+               TRANSLATE2(TR_NICK, TR_TEXT);
        }
 
        CmdResult Handle(const std::vector<std::string> &parameters, User *user)
@@ -47,19 +45,19 @@ class CommandChgname : public Command
 
                if (parameters[1].empty())
                {
-                       user->WriteServ("NOTICE %s :*** CHGNAME: GECOS must be specified", user->nick.c_str());
+                       user->WriteNotice("*** CHGNAME: GECOS must be specified");
                        return CMD_FAILURE;
                }
 
                if (parameters[1].length() > ServerInstance->Config->Limits.MaxGecos)
                {
-                       user->WriteServ("NOTICE %s :*** CHGNAME: GECOS too long", user->nick.c_str());
+                       user->WriteNotice("*** CHGNAME: GECOS too long");
                        return CMD_FAILURE;
                }
 
                if (IS_LOCAL(dest))
                {
-                       dest->ChangeName(parameters[1].c_str());
+                       dest->ChangeName(parameters[1]);
                        ServerInstance->SNO->WriteGlobalSno('a', "%s used CHGNAME to change %s's GECOS to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->fullname.c_str());
                }
 
@@ -84,12 +82,12 @@ public:
        {
        }
 
-       void init()
+       void init() CXX11_OVERRIDE
        {
                ServerInstance->Modules->AddService(cmd);
        }
 
-       virtual Version GetVersion()
+       Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides support for the CHGNAME command", VF_OPTCOMMON | VF_VENDOR);
        }