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"
21 void cmd_part::Handle (const char** parameters, int pcnt, userrec *user)
23 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
26 chanrec* c = ServerInstance->FindChan(parameters[0]);
30 if (!c->PartUser(user, pcnt > 1 ? parameters[0] : NULL))
31 /* Arse, who stole our channel! :/ */
36 user->WriteServ( "401 %s %s :No such channel", user->nick, parameters[0]);