]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sapart.cpp
Merge commit 'refs/merge-requests/5' of git://gitorious.org/inspircd/inspircd into...
[user/henk/code/inspircd.git] / src / modules / m_sapart.cpp
index 0c0ac7e1312b200ae8ab24e584a3f55e9265fe9a..d6ba847e48d282b9c8e9c0df4e90262be352d9b2 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
@@ -20,9 +20,9 @@
 class CommandSapart : public Command
 {
  public:
-       CommandSapart (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"SAPART", "o", 2, 3, false, 0)
+       CommandSapart(Module* Creator) : Command(Creator,"SAPART", 2, 3)
        {
-               syntax = "<nick> <channel> [reason]";
+               flags_needed = 'o'; Penalty = 0; syntax = "<nick> <channel> [reason]";
                TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END);
        }
 
@@ -49,8 +49,7 @@ class CommandSapart : public Command
                         */
                        if (IS_LOCAL(dest))
                        {
-                               if (!channel->PartUser(dest, reason))
-                                       delete channel;
+                               channel->PartUser(dest, reason);
 
                                Channel* n = ServerInstance->FindChan(parameters[1]);
                                if (!n)
@@ -97,8 +96,8 @@ class ModuleSapart : public Module
 {
        CommandSapart cmd;
  public:
-       ModuleSapart(InspIRCd* Me)
-               : Module(Me), cmd(Me, this)
+       ModuleSapart()
+               : cmd(this)
        {
                ServerInstance->AddCommand(&cmd);
        }
@@ -109,7 +108,7 @@ class ModuleSapart : public Module
 
        virtual Version GetVersion()
        {
-               return Version("$Id$", VF_OPTCOMMON | VF_VENDOR, API_VERSION);
+               return Version("Provides support for unreal-style SAPART command", VF_OPTCOMMON | VF_VENDOR);
        }
 
 };