summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r--src/modules/m_spanningtree.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp
index ce2843d18..a98e90add 100644
--- a/src/modules/m_spanningtree.cpp
+++ b/src/modules/m_spanningtree.cpp
@@ -1629,6 +1629,23 @@ class TreeSocket : public InspSocket
// This is the 'authenticated' state, when all passwords
// have been exchanged and anything past this point is taken
// as gospel.
+
+ if (prefix != "")
+ {
+ std::string direction = prefix;
+ userrec* t = Srv->FindNick(prefix);
+ if (t)
+ {
+ direction = t->server;
+ }
+ TreeServer* route_back_again = BestRouteTo(direction);
+ if ((!route_back_again) || (back_again->GetSocket() != this))
+ {
+ WriteOpers("*** \2WARNING\2! Fake direction in command '%s' from connection '%s'",line.c_str(),this->GetName());
+ return true;
+ }
+ }
+
if (command == "SVSMODE")
{
/* Services expects us to implement