From 3eb205218a321e454d873ae14e2e717ce9d64142 Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Wed, 16 Apr 2014 13:08:44 +0200 Subject: m_spanningtree Throw an exception on protocol violations instead of returning CMD_INVALID Catch CoreExceptions, log and close the link in OnDataReady() --- src/modules/m_spanningtree/fmode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/m_spanningtree/fmode.cpp') diff --git a/src/modules/m_spanningtree/fmode.cpp b/src/modules/m_spanningtree/fmode.cpp index 48e4a19b9..5627b023b 100644 --- a/src/modules/m_spanningtree/fmode.cpp +++ b/src/modules/m_spanningtree/fmode.cpp @@ -50,7 +50,7 @@ CmdResult CommandFMode::Handle(User* who, std::vector& params) return CMD_FAILURE; if (IS_SERVER(user)) - return CMD_INVALID; + throw ProtocolException("Invalid target"); ourTS = user->age; } -- cgit v1.3.1-10-gc9f91