]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sanick.cpp
Send HALFOP= line in CAPAB CAPABILITIES for 1201 compat (anope relies on this)
[user/henk/code/inspircd.git] / src / modules / m_sanick.cpp
index 82d1fd3a58152d8fb9dab4a0fd8eeb15d4f6c90f..199513efaab8f7dbf9e4073a0543084f1ae329b4 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
@@ -57,15 +57,13 @@ class CommandSanick : public Command
                {
                        std::string oldnick = user->nick;
                        std::string newnick = target->nick;
-                       if (target->ForceNickChange(parameters[1].c_str()))
+                       if (target->ChangeNick(parameters[1], true))
                        {
-                               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]);
+                               ServerInstance->SNO->WriteGlobalSno('a', oldnick+" used SANICK to change "+newnick+" to "+parameters[1]);
                        }
                        else
                        {
-                               ServerInstance->SNO->WriteToSnoMask('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
-                               ServerInstance->PI->SendSNONotice("A", oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
+                               ServerInstance->SNO->WriteGlobalSno('a', oldnick+" failed SANICK (from "+newnick+" to "+parameters[1]+")");
                        }
                }
 
@@ -86,8 +84,8 @@ class ModuleSanick : public Module
 {
        CommandSanick cmd;
  public:
-       ModuleSanick(InspIRCd* Me)
-               : Module(Me), cmd(this)
+       ModuleSanick()
+               : cmd(this)
        {
                ServerInstance->AddCommand(&cmd);
        }
@@ -98,7 +96,7 @@ class ModuleSanick : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_OPTCOMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for SANICK command", VF_OPTCOMMON | VF_VENDOR);
        }
 
 };