]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chgident.cpp
Remove useless vector copy
[user/henk/code/inspircd.git] / src / modules / m_chgident.cpp
index 4943e3df81afd0b0413589985d6673157bd0acb2..9dc8cbd50c22406e7c67860e46bc03b22384d803 100644 (file)
@@ -58,7 +58,7 @@ class CommandChgident : public Command
                dest->ChangeIdent(parameters[1].c_str());
 
                if (!ServerInstance->ULine(user->server))
-                       ServerInstance->SNO->WriteToSnoMask('a', "%s used CHGIDENT to change %s's ident to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->ident.c_str());
+                       ServerInstance->SNO->WriteToSnoMask(IS_LOCAL(dest) ? 'a' : 'A', "%s used CHGIDENT to change %s's ident to '%s'", user->nick.c_str(), dest->nick.c_str(), dest->ident.c_str());
 
                /* route it! */
                return CMD_SUCCESS;
@@ -68,15 +68,12 @@ class CommandChgident : public Command
 
 class ModuleChgIdent : public Module
 {
-       CommandChgident* mycommand;
-
+       CommandChgident cmd;
 
 public:
-       ModuleChgIdent(InspIRCd* Me) : Module(Me)
+       ModuleChgIdent(InspIRCd* Me) : Module(Me), cmd(Me)
        {
-               mycommand = new CommandChgident(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
 
        virtual ~ModuleChgIdent()