From: danieldg Date: Fri, 2 Oct 2009 06:13:57 +0000 (+0000) Subject: Fix routing for normal core commands like QUIT X-Git-Tag: v2.0.23~1458 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=e57ed15735a3f23d6451845c7cf96758e6909d8c;p=user%2Fhenk%2Fcode%2Finspircd.git Fix routing for normal core commands like QUIT git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11795 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/include/ctables.h b/include/ctables.h index dd83a05a3..c0c094e6f 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -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 */ diff --git a/src/commands/cmd_kick.cpp b/src/commands/cmd_kick.cpp index d07d53836..d160b030b 100644 --- a/src/commands/cmd_kick.cpp +++ b/src/commands/cmd_kick.cpp @@ -13,14 +13,6 @@ #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& parameters, User *user); }; -#endif - /** Handle /KICK */ diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index fae734d52..fbac46faa 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -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) {