]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sanick.cpp
Remove useless vector copy
[user/henk/code/inspircd.git] / src / modules / m_sanick.cpp
index 824b3fa6a97fe079440a3f13856c37e1167f6ce8..180e4ba810c043b29bbf15586731993e8130aa9d 100644 (file)
@@ -60,12 +60,12 @@ class CommandSanick : public Command
                        std::string newnick = target->nick;
                        if (target->ForceNickChange(parameters[1].c_str()))
                        {
-                               ServerInstance->SNO->WriteToSnoMask('A', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
+                               ServerInstance->SNO->WriteToSnoMask('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
                                ServerInstance->PI->SendSNONotice("A", oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
                        }
                        else
                        {
-                               ServerInstance->SNO->WriteToSnoMask('A', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
+                               ServerInstance->SNO->WriteToSnoMask('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
                                ServerInstance->PI->SendSNONotice("A", oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
                        }
                        /* Yes, hit target and we have sent our NICK out, we can now bail */
@@ -80,15 +80,12 @@ class CommandSanick : public Command
 
 class ModuleSanick : public Module
 {
-       CommandSanick*  mycommand;
+       CommandSanick cmd;
  public:
        ModuleSanick(InspIRCd* Me)
-               : Module(Me)
+               : Module(Me), cmd(Me)
        {
-
-               mycommand = new CommandSanick(ServerInstance);
-               ServerInstance->AddCommand(mycommand);
-
+               ServerInstance->AddCommand(&cmd);
        }
 
        virtual ~ModuleSanick()