]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sapart.cpp
Fix m_randquote with 0 quotes
[user/henk/code/inspircd.git] / src / modules / m_sapart.cpp
index 81ca709efc63f0a62cb5a53ac3ae28db74c5aefe..89256e0e480bfc5cc9811e69a27f4a12d66b545e 100644 (file)
@@ -40,7 +40,7 @@ class CommandSapart : public Command
                Channel* channel = ServerInstance->FindChan(parameters[1]);
                std::string reason;
 
-               if (dest && channel)
+               if ((dest) && (dest->registered == REG_ALL) && (channel))
                {
                        if (parameters.size() > 2)
                                reason = parameters[2];
@@ -107,7 +107,11 @@ class ModuleSapart : public Module
        ModuleSapart()
                : cmd(this)
        {
-               ServerInstance->AddCommand(&cmd);
+       }
+
+       void init()
+       {
+               ServerInstance->Modules->AddService(cmd);
        }
 
        virtual ~ModuleSapart()