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_part.h"
23 extern "C" command_t* init_command(InspIRCd* Instance)
25 return new cmd_part(Instance);
28 CmdResult cmd_part::Handle (const char** parameters, int pcnt, userrec *user)
30 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
33 chanrec* c = ServerInstance->FindChan(parameters[0]);
37 if (!c->PartUser(user, pcnt > 1 ? parameters[1] : NULL))
38 /* Arse, who stole our channel! :/ */
43 user->WriteServ( "401 %s %s :No such channel", user->nick, parameters[0]);