summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-07-28 14:48:50 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-07-28 14:48:50 +0200
commitd572f1a67dbe8979f616cd2451b11a422cce0ade (patch)
tree3d02fdc1762cd59fb313e984914ef43030fbf90d /src
parent037b0e51fc6c9499defe21ddf35e87db7173d9c9 (diff)
m_spanningtree Throw a ProtocolException if a server SQUITs a server it shouldn't
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_spanningtree/treesocket1.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree/treesocket1.cpp b/src/modules/m_spanningtree/treesocket1.cpp
index 4e738488b..1a8bdd06c 100644
--- a/src/modules/m_spanningtree/treesocket1.cpp
+++ b/src/modules/m_spanningtree/treesocket1.cpp
@@ -154,6 +154,8 @@ CmdResult CommandSQuit::HandleServer(TreeServer* server, std::vector<std::string
ret = CMD_FAILURE;
server = server->GetParent();
}
+ else if (quitting->GetParent() != server)
+ throw ProtocolException("Attempted to SQUIT a non-directly connected server or the parent");
server->SQuitChild(quitting, params[1]);