]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sapart.cpp
Of course, it DOES help to actually initialise the Mutex objects, and delete them...
[user/henk/code/inspircd.git] / src / modules / m_sapart.cpp
index 1baabc463e116eb6b6eb3c751bc39cff6573df0c..c010b289f499e57e068405f6f775073eef70335c 100644 (file)
@@ -31,7 +31,7 @@ class CommandSapart : public Command
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
                Channel* channel = ServerInstance->FindChan(parameters[1]);
-               std::string reason;
+               std::string reason = "";
 
                if (dest && channel)
                {
@@ -40,7 +40,7 @@ class CommandSapart : public Command
 
                        if (ServerInstance->ULine(dest->server))
                        {
-                               user->WriteNumeric(990, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
+                               user->WriteNumeric(ERR_NOPRIVILEGES, "%s :Cannot use an SA command on a u-lined client",user->nick.c_str());
                                return CMD_FAILURE;
                        }
 
@@ -50,7 +50,7 @@ class CommandSapart : public Command
                         */
                        if (IS_LOCAL(dest))
                        {
-                               if (!channel->PartUser(dest, reason.empty() ? NULL : reason.c_str()))
+                               if (!channel->PartUser(dest, reason))
                                        delete channel;
 
                                Channel* n = ServerInstance->FindChan(parameters[1]);
@@ -109,7 +109,7 @@ class ModuleSapart : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1, 2, 0, 1, VF_COMMON | VF_VENDOR, API_VERSION);
+               return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
        }
 
 };