diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 00:42:50 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-02 00:42:50 +0000 |
commit | 1b213e678b6e9c3e2ddefdeee44de18e98e05550 (patch) | |
tree | b8071b4efb79b77b86115595f5710cc1f6f7beb3 /src/modules | |
parent | da1010f4077eae5d1602c9fe7d74a2426387b8b2 (diff) |
Verify modules providing routed commands are VF_COMMON
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11590 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/postcommand.cpp | 9 |
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 |