]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sakick.cpp
Fix some logically dead code which was found by Coverity.
[user/henk/code/inspircd.git] / src / modules / m_sakick.cpp
index d1c0f6e9257ad6c256bdff05128fa434a08eae80..7dfcd8904db3b7e8531059e270274a6eac547cb5 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)
                        {
@@ -109,7 +109,7 @@ class ModuleSakick : public Module
 
        void init()
        {
-               ServerInstance->AddCommand(&cmd);
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleSakick()