summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/postcommand.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp
index 2bf252cc0..b3f2f80bb 100644
--- a/src/modules/m_spanningtree/postcommand.cpp
+++ b/src/modules/m_spanningtree/postcommand.cpp
@@ -33,6 +33,15 @@ void ModuleSpanningTree::OnPostCommand(const std::string &command, const std::ve
{
/* Safe, we know its non-null because IsValidModuleCommand returned true */
Command* thiscmd = ServerInstance->Parser->GetHandler(command);
+
+ Module* srcmodule = ServerInstance->Modules->Find(thiscmd->source);
+
+ if (srcmodule && !(srcmodule->GetVersion().Flags & VF_COMMON)) {
+ ServerInstance->Logs->Log("m_spanningtree",ERROR,"Routed command %s from non-VF_COMMON module %s",
+ command.c_str(), thiscmd->source.c_str());
+ return;
+ }
+
// this bit of code cleverly routes all module commands
// to all remote severs *automatically* so that modules
// can just handle commands locally, without having