From 68174076d7d665340ca992f88013dc2e6035a0a8 Mon Sep 17 00:00:00 2001 From: danieldg Date: Wed, 2 Sep 2009 00:52:21 +0000 Subject: Route CHGHOST/CHGNAME/CHGIDENT using optional unicast routing git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11653 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_chghost.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/modules/m_chghost.cpp') diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index a8cad8d43..0d509b7d9 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -66,14 +66,17 @@ class CommandChghost : public Command // fix by brain - ulines set hosts silently ServerInstance->SNO->WriteGlobalSno('a', std::string(user->nick)+" used CHGHOST to make the displayed host of "+dest->nick+" become "+dest->dhost); } - - /* ChangeDisplayedHost fixes it for us */ - return CMD_LOCALONLY; } - /* route it! */ return CMD_SUCCESS; + } + 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; } }; @@ -112,7 +115,7 @@ class ModuleChgHost : public Module Version GetVersion() { - return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION); + return Version("$Id$", VF_OPTCOMMON | VF_VENDOR, API_VERSION); } }; -- cgit v1.2.3