diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-02 09:57:48 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-02 09:57:48 +0000 |
commit | 18c757067c0a9e5c1aa81496dca8428a0bf3635f (patch) | |
tree | 4391711a1e206ba168c5bcb69bdeee79069a8510 /src/modules | |
parent | 86499a92b6ede0fc80ee36e14a2a248a088e5e43 (diff) |
Changed definition of CallHandler and CallCommandHandler for the ability to return false on bad command.
This allows us to terminate server links that send commands we dont know (e.g. admin loads module A after linking, we dont have module A, when it sends module A's command, abort)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3414 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index b33e28af8..f927ac044 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2513,7 +2513,11 @@ class TreeSocket : public InspSocket { strparams[q] = (char*)params[q].c_str(); } - Srv->CallCommandHandler(command.c_str(), strparams, params.size(), who); + if (!Srv->CallCommandHandler(command.c_str(), strparams, params.size(), who)) + { + this->WriteLine("ERROR :Unrecognised command -- possibly loaded mismatched modules"); + return false; + } } else { |