From 4aed5846f17b15939aaf620ee4c4ca95a10609fc Mon Sep 17 00:00:00 2001 From: Attila Molnar Date: Tue, 29 Mar 2016 12:54:02 +0200 Subject: Simplify GetRouting() methods doing unicast --- src/modules/m_nicklock.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/modules/m_nicklock.cpp') diff --git a/src/modules/m_nicklock.cpp b/src/modules/m_nicklock.cpp index a517e95ac..35845c8d8 100644 --- a/src/modules/m_nicklock.cpp +++ b/src/modules/m_nicklock.cpp @@ -78,10 +78,7 @@ class CommandNicklock : public Command RouteDescriptor GetRouting(User* user, const std::vector& parameters) { - User* dest = ServerInstance->FindNick(parameters[0]); - if (dest) - return ROUTE_OPT_UCAST(dest->server); - return ROUTE_LOCALONLY; + return ROUTE_OPT_UCAST(parameters[0]); } }; @@ -128,10 +125,7 @@ class CommandNickunlock : public Command RouteDescriptor GetRouting(User* user, const std::vector& parameters) { - User* dest = ServerInstance->FindNick(parameters[0]); - if (dest) - return ROUTE_OPT_UCAST(dest->server); - return ROUTE_LOCALONLY; + return ROUTE_OPT_UCAST(parameters[0]); } }; -- cgit v1.2.3