summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-08 20:21:43 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-08 20:21:43 +0000
commit8e2f50ab779bcd903dbe46a5f11c4ee5ceb0730b (patch)
tree9dbbcda89d7a0d8b80811ee3b40f9c6fc3841a75 /src/modules/m_spanningtree.cpp
parent7271c8da88b3461fb5b3b3a80d455400f0c75880 (diff)
Added 'fake direction' check
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2278 e03df62e-2008-0410-955e-edbf42e46eb7
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