]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_remove.cpp
(Hopefully) fix a issue with m_ident's result not being used for display.
[user/henk/code/inspircd.git] / src / modules / m_remove.cpp
index 4dfa0bfb5c18300f3807c3b49953649f90da4e1e..6e5eaae46770eaa764ac26a7128039e9d4d7db31 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -99,7 +99,7 @@ class RemoveBase
                /* Fix by brain - someone needs to learn to validate their input! */
                if (!target || !channel)
                {
-                       user->WriteNumeric(401, "%s %s :No such nick/channel", user->nick.c_str(), !target ? username : channame);
+                       user->WriteNumeric(ERR_NOSUCHNICK, "%s %s :No such nick/channel", user->nick.c_str(), !target ? username : channame);
                        return CMD_FAILURE;
                }
 
@@ -180,7 +180,7 @@ class RemoveBase
                                channel->WriteChannelWithServ(ServerInstance->Config->ServerName, "NOTICE %s :%s removed %s from the channel", channel->name.c_str(), user->nick.c_str(), target->nick.c_str());
                                target->WriteServ("NOTICE %s :*** %s removed you from %s with the message: %s", target->nick.c_str(), user->nick.c_str(), channel->name.c_str(), reasonparam.c_str());
 
-                               if (!channel->PartUser(target, reason.c_str()))
+                               if (!channel->PartUser(target, reason))
                                        delete channel;
                        }
                        else
@@ -206,7 +206,7 @@ class RemoveBase
 class CommandRemove : public Command, public RemoveBase
 {
  public:
-       CommandRemove(InspIRCd* Instance, bool& snk) : Command(Instance, "REMOVE", 0, 2), RemoveBase(Instance, snk)
+       CommandRemove(InspIRCd* Instance, bool& snk) : Command(Instance, "REMOVE", 0, 2, 2, false, 0), RemoveBase(Instance, snk)
        {
                this->source = "m_remove.so";
                syntax = "<nick> <channel> [<reason>]";
@@ -251,7 +251,7 @@ class ModuleRemove : public Module
                mycommand2 = new CommandFpart(ServerInstance, supportnokicks);
                ServerInstance->AddCommand(mycommand);
                ServerInstance->AddCommand(mycommand2);
-               OnRehash(NULL,"");
+               OnRehash(NULL);
                Implementation eventlist[] = { I_On005Numeric, I_OnRehash };
                ServerInstance->Modules->Attach(eventlist, this, 2);
        }
@@ -262,7 +262,7 @@ class ModuleRemove : public Module
                output.append(" REMOVE");
        }
 
-       virtual void OnRehash(User* user, const std::string&)
+       virtual void OnRehash(User* user)
        {
                ConfigReader conf(ServerInstance);
                supportnokicks = conf.ReadFlag("remove", "supportnokicks", 0);
@@ -274,7 +274,7 @@ class ModuleRemove : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1, 2, 1, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
        }
 
 };