]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chghost.cpp
Simplify /SAJOIN syntax and add permission for joining other users.
[user/henk/code/inspircd.git] / src / modules / m_chghost.cpp
index 4d8223d137d29cdcad7dc48cb964478b232cc746..eefac00f101743f0ec41c00f44c2cfa0efefb221 100644 (file)
@@ -58,13 +58,13 @@ class CommandChghost : public Command
 
                if ((!dest) || (dest->registered != REG_ALL))
                {
-                       user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), parameters[0].c_str());
+                       user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", parameters[0].c_str());
                        return CMD_FAILURE;
                }
 
                if (IS_LOCAL(dest))
                {
-                       if ((dest->ChangeDisplayedHost(parameters[1])) && (!ServerInstance->ULine(user->server)))
+                       if ((dest->ChangeDisplayedHost(parameters[1])) && (!user->server->IsULine()))
                        {
                                // fix by brain - ulines set hosts silently
                                ServerInstance->SNO->WriteGlobalSno('a', user->nick+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost);
@@ -94,11 +94,6 @@ class ModuleChgHost : public Module
        {
        }
 
-       void init() CXX11_OVERRIDE
-       {
-               ServerInstance->Modules->AddService(cmd);
-       }
-
        void ReadConfig(ConfigStatus& status) CXX11_OVERRIDE
        {
                std::string hmap = ServerInstance->Config->ConfValue("hostname")->getString("charmap", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.-_/0123456789");