]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sakick.cpp
Show a better warning when certtool/openssl are missing.
[user/henk/code/inspircd.git] / src / modules / m_sakick.cpp
index 2cb1f2a0449f1f521e7e8c69c34b4eb19a5b5f66..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)
                        {
@@ -76,7 +76,7 @@ class CommandSakick : public Command
                        if (IS_LOCAL(user))
                        {
                                /* Locally issued command; send the snomasks */
-                               ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick) + " SAKICKed " + dest->nick + " on " + parameters[0]);
+                               ServerInstance->SNO->WriteGlobalSno('a', user->nick + " SAKICKed " + dest->nick + " on " + parameters[0]);
                        }
 
                        return CMD_SUCCESS;
@@ -105,7 +105,11 @@ class ModuleSakick : public Module
        ModuleSakick()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleSakick()