1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
16 #include "commands/cmd_join.h"
18 extern "C" command_t* init_command(InspIRCd* Instance)
20 return new cmd_join(Instance);
25 CmdResult cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
29 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0, 1))
32 if (ServerInstance->IsChannel(parameters[0]))
34 chanrec::JoinUser(ServerInstance, user, parameters[0], false, parameters[1]);
40 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
43 if (ServerInstance->IsChannel(parameters[0]))
45 chanrec::JoinUser(ServerInstance, user, parameters[0], false);
50 user->WriteServ("403 %s %s :Invalid channel name",user->nick, parameters[0]);