From 0fad2325b495aea5302abce3d9c3f0bd0720281e Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 21 Dec 2005 20:33:32 +0000 Subject: Improved m_alias to only capture complete commands and rewrite them (bug #92 as reported by strike) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2601 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 604c081d8..a4b34f689 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2635,8 +2635,12 @@ class ModuleSpanningTree : public Module return false; } - virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user) + virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user, bool validated) { + /* If the command doesnt appear to be valid, we dont want to mess with it. */ + if (!validated) + return; + if (command == "CONNECT") { return this->HandleConnect(parameters,pcnt,user); -- cgit v1.2.3