1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
19 #include "commands/cmd_join.h"
21 extern "C" command_t* init_command(InspIRCd* Instance)
23 return new cmd_join(Instance);
28 CmdResult cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
32 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0, 1))
35 if (ServerInstance->IsChannel(parameters[0]))
37 chanrec::JoinUser(ServerInstance, user, parameters[0], false, parameters[1]);
43 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
46 if (ServerInstance->IsChannel(parameters[0]))
48 chanrec::JoinUser(ServerInstance, user, parameters[0], false);
53 user->WriteServ("403 %s %s :Invalid channel name",user->nick, parameters[0]);