1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
17 #include "socketengine.h"
21 #include "treeserver.h"
24 CmdResult CommandSVSJoin::Handle(const std::vector<std::string>& parameters, User *user)
26 // Check for valid channel name
27 if (!ServerInstance->IsChannel(parameters[1].c_str(), ServerInstance->Config->Limits.ChanMax))
30 // Check target exists
31 User* u = ServerInstance->FindNick(parameters[0]);
35 /* only join if it's local, otherwise just pass it on! */
37 Channel::JoinUser(u, parameters[1].c_str(), false, "", false, ServerInstance->Time());
41 RouteDescriptor CommandSVSJoin::GetRouting(User* user, const std::vector<std::string>& parameters)
43 User* u = ServerInstance->FindNick(parameters[0]);
45 return ROUTE_OPT_UCAST(u->server);
46 return ROUTE_LOCALONLY;