]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sakick.cpp
Work around removing shuns on nicks when the nick is online.
[user/henk/code/inspircd.git] / src / modules / m_sakick.cpp
index d1c0f6e9257ad6c256bdff05128fa434a08eae80..afca49e251ba17b3294670277915a5f17b8b0bd5 100644 (file)
@@ -39,7 +39,7 @@ class CommandSakick : public Command
                Channel* channel = ServerInstance->FindChan(parameters[0]);
                const char* reason = "";
 
-               if (dest && channel)
+               if ((dest) && (dest->registered == REG_ALL) && (channel))
                {
                        if (parameters.size() > 2)
                        {
@@ -63,14 +63,6 @@ class CommandSakick : public Command
                        if (IS_LOCAL(dest))
                        {
                                channel->KickUser(ServerInstance->FakeClient, dest, reason);
-
-                               Channel *n = ServerInstance->FindChan(parameters[1]);
-                               if (n && n->HasUser(dest))
-                               {
-                                       /* Sort-of-bug: If the command was issued remotely, this message won't be sent */
-                                       user->WriteServ("NOTICE %s :*** Unable to kick %s from %s", user->nick.c_str(), dest->nick.c_str(), parameters[0].c_str());
-                                       return CMD_FAILURE;
-                               }
                        }
 
                        if (IS_LOCAL(user))
@@ -109,7 +101,7 @@ class ModuleSakick : public Module
 
        void init()
        {
-               ServerInstance->AddCommand(&cmd);
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleSakick()