]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_setname.cpp
Rename the spanningtree module header to server.
[user/henk/code/inspircd.git] / src / modules / m_setname.cpp
index bb193577515af707567fd4dfc0d3bad2b469ef2d..34428e9c04e4bc31cb3b3dfcbe7de89453d84cef 100644 (file)
@@ -32,7 +32,7 @@ class CommandSetname : public Command
                syntax = "<new-gecos>";
        }
 
-       CmdResult Handle (const std::vector<std::string>& parameters, User *user)
+       CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE
        {
                if (parameters[0].size() > ServerInstance->Config->Limits.MaxGecos)
                {
@@ -40,7 +40,7 @@ class CommandSetname : public Command
                        return CMD_FAILURE;
                }
 
-               if (user->ChangeName(parameters[0].c_str()))
+               if (user->ChangeName(parameters[0]))
                {
                        ServerInstance->SNO->WriteGlobalSno('a', "%s used SETNAME to change their GECOS to '%s'", user->nick.c_str(), parameters[0].c_str());
                }
@@ -59,11 +59,6 @@ class ModuleSetName : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(cmd);
-       }
-
        Version GetVersion() CXX11_OVERRIDE
        {
                return Version("Provides support for the SETNAME command", VF_VENDOR);