]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_filter.h
PROPAGATE this fix
[user/henk/code/inspircd.git] / src / modules / m_filter.h
index 9c9a1238e546169b34d02935620f74d08ee142b0..5e74177e5073ce59ccadd902c4d1074cd518a1c7 100644 (file)
@@ -341,7 +341,7 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters
                command_t* c = ServerInstance->Parser->GetHandler(command);
                if (c)
                {
-                       const char* params[127];
+                       const char* params[MAXPARAMETERS];
                        for (int item = 0; item < pcnt; item++)
                                params[item] = parameters[item];
                        params[replacepoint] = "Reason filtered";
@@ -359,12 +359,8 @@ int FilterBase::OnPreCommand(const std::string &command, const char** parameters
                                /* Are they parting, if so, kill is applicable */
                                if ((parting) && (f->action == "kill"))
                                {
-                                       user->SetWriteError("Filtered: "+f->reason);
-                                       /* This WriteServ causes the write error to be applied.
-                                        * Its not safe to kill here with QuitUser in a PreCommand handler,
-                                        * so we do it this way, which is safe just about anywhere.
-                                        */
                                        user->WriteServ("NOTICE %s :*** Your PART message was filtered: %s", user->nick, f->reason.c_str());
+                                       userrec::QuitUser(ServerInstance, user, "Filtered: " + f->reason);
                                }
                                if (f->action == "gline")
                                {