]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix routing for normal core commands like QUIT
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 2 Oct 2009 06:13:57 +0000 (06:13 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Fri, 2 Oct 2009 06:13:57 +0000 (06:13 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11795 e03df62e-2008-0410-955e-edbf42e46eb7

include/ctables.h
src/commands/cmd_kick.cpp
src/modules/m_spanningtree/postcommand.cpp

index dd83a05a3ca118cd4337e2143cd9ac05b54b2531..c0c094e6f5562dc33c4450fd929fa7480123a2b1 100644 (file)
@@ -58,10 +58,10 @@ struct RouteDescriptor
 {
        /** Routing type from the enum above
         */
-       const RouteType type;
+       RouteType type;
        /** For unicast, the destination server's name
         */
-       const std::string serverdest;
+       std::string serverdest;
 
        /** Create a RouteDescriptor
         */
index d07d5383636a6d4a6c9ee79fd07e084ba8b051e9..d160b030b2eb99f52b126a207cbbf5a14af04611 100644 (file)
 
 #include "inspircd.h"
 
-#ifndef __CMD_KICK_H__
-#define __CMD_KICK_H__
-
-// include the common header files
-
-#include "users.h"
-#include "channels.h"
-
 /** Handle /KICK. These command handlers can be reloaded by the core,
  * and handle basic RFC1459 commands. Commands within modules work
  * the same way, however, they can be fully unloaded, where these
@@ -41,8 +33,6 @@ class CommandKick : public Command
        CmdResult Handle(const std::vector<std::string>& parameters, User *user);
 };
 
-#endif
-
 
 /** Handle /KICK
  */
index fae734d520124293b73376daf777641850bca216..fbac46faa4b82b25f45562f53a96df14dbd27a54 100644 (file)
@@ -46,7 +46,15 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, const std::string &
 
        if (routing.type == ROUTE_TYPE_LOCALONLY)
        {
-               return;
+               Module* srcmodule = thiscmd->creator;
+               Version ver = srcmodule->GetVersion();
+
+               if ((ver.Flags & VF_CORE) && !IS_LOCAL(user))
+                       routing = ROUTE_BROADCAST;
+               else
+                       return;
+               if (user == ServerUser)
+                       return;
        }
        else if (routing.type == ROUTE_TYPE_OPT_BCAST)
        {