1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2009 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
15 #include "commands/cmd_names.h"
17 extern "C" DllExport Command* init_command(InspIRCd* Instance)
19 return new CommandNames(Instance);
24 CmdResult CommandNames::Handle (const std::vector<std::string>& parameters, User *user)
28 if (!parameters.size())
30 user->WriteNumeric(366, "%s * :End of /NAMES list.",user->nick.c_str());
34 if (ServerInstance->Parser->LoopCall(user, this, parameters, 0))
37 c = ServerInstance->FindChan(parameters[0]);
40 if ((c->IsModeSet('s')) && (!c->HasUser(user)))
42 user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick.c_str(), c->name.c_str());
49 user->WriteNumeric(401, "%s %s :No such nick/channel",user->nick.c_str(), parameters[0].c_str());