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_names.h"
23 extern "C" command_t* init_command(InspIRCd* Instance)
25 return new cmd_names(Instance);
28 void cmd_names::Handle (const char** parameters, int pcnt, userrec *user)
34 user->WriteServ("366 %s * :End of /NAMES list.",user->nick);
38 if (ServerInstance->Parser->LoopCall(user, this, parameters, pcnt, 0))
41 c = ServerInstance->FindChan(parameters[0]);
44 if ((c->modes[CM_SECRET]) && (!c->HasUser(user)))
46 user->WriteServ("401 %s %s :No such nick/channel",user->nick, c->name);
50 user->WriteServ("366 %s %s :End of /NAMES list.", user->nick, c->name);
54 user->WriteServ("401 %s %s :No such nick/channel",user->nick, parameters[0]);