X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_watch.cpp;h=029055db4ee9cb8716f66115a32650ee80e11c49;hb=a17421dca39d4afabf7143797baa6e13a19a5a97;hp=1ac93bb007ef5b2d83f3f82097d3ed4db0e8096f;hpb=cd712c40e1b352c05e7ae0f72e0a5e84cdf64323;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 1ac93bb00..029055db4 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -1,16 +1,25 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon + * + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2005-2008 Craig Edwards + * Copyright (C) 2006-2008 Robin Burchell + * Copyright (C) 2007 Dennis Friis * - * InspIRCd: (C) 2002-2010 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. * - * --------------------------------------------------- + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + #include "inspircd.h" /* $ModDesc: Provides support for the /WATCH command */ @@ -90,7 +99,7 @@ #if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) typedef nspace::hash_map, nspace::hash_compare > > watchentries; #else - typedef nspace::hash_map, nspace::hash > watchentries; + typedef nspace::hash_map, irc::hash> watchentries; #endif typedef std::map watchlist; @@ -128,7 +137,10 @@ class CommandSVSWatch : public Command RouteDescriptor GetRouting(User* user, const std::vector& parameters) { - return ROUTE_BROADCAST; + User* target = ServerInstance->FindNick(parameters[0]); + if (target) + return ROUTE_OPT_UCAST(target->server); + return ROUTE_LOCALONLY; } }; @@ -528,7 +540,7 @@ class Modulewatch : public Module virtual Version GetVersion() { - return Version("Provides support for the /WATCH command", VF_COMMON | VF_VENDOR); + return Version("Provides support for the /WATCH command", VF_OPTCOMMON | VF_VENDOR); } };