From da2b0ee6cad139804442a1ebcd0448755714f22a Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 29 Mar 2016 12:50:00 +0200 Subject: m_spanningtree Use SpanningTreeUtilities::FindRouteTarget() in RouteCommand() This makes ROUTE_UNICAST() accept nicks and uuids --- src/modules/m_spanningtree/postcommand.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/postcommand.cpp b/src/modules/m_spanningtree/postcommand.cpp index ae98be946..7b0478229 100644 --- a/src/modules/m_spanningtree/postcommand.cpp +++ b/src/modules/m_spanningtree/postcommand.cpp @@ -51,7 +51,9 @@ void SpanningTreeUtilities::RouteCommand(TreeServer* origin, CommandBase* thiscm sdest = static_cast(routing.server); if (!sdest) { - sdest = FindServer(routing.serverdest); + // Assume the command handler already validated routing.serverdest and have only returned success if the target is something that the + // user executing the command is allowed to look up e.g. target is not an uuid if user is local. + sdest = FindRouteTarget(routing.serverdest); if (!sdest) { ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Trying to route %s%s to nonexistant server %s", (encap ? "ENCAP " : ""), command.c_str(), routing.serverdest.c_str()); -- cgit v1.2.3