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 * ---------------------------------------------------
20 #include "helperfuncs.h"
21 #include "commands/cmd_join.h"
23 extern InspIRCd* ServerInstance;
25 void cmd_join::Handle (const char** parameters, int pcnt, userrec *user)
29 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0, 1))
32 if (IsValidChannelName(parameters[0]))
34 add_channel(user, parameters[0], parameters[1], false);
40 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
43 if (IsValidChannelName(parameters[0]))
45 add_channel(user, parameters[0], "", false);
50 WriteServ(user->fd,"403 %s %s :Invalid channel name",user->nick, parameters[0]);