1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 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 * ---------------------------------------------------
16 /** Handle /INFO. These command handlers can be reloaded by the core,
17 * and handle basic RFC1459 commands. Commands within modules work
18 * the same way, however, they can be fully unloaded, where these
21 class CommandInfo : public Command
24 /** Constructor for info.
26 CommandInfo ( Module* parent) : Command(parent,"INFO") { syntax = "[<servermask>]"; }
28 * @param parameters The parameters to the comamnd
29 * @param pcnt The number of parameters passed to teh command
30 * @param user The user issuing the command
31 * @return A value from CmdResult to indicate command success or failure.
33 CmdResult Handle(const std::vector<std::string>& parameters, User *user);
34 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
36 if (parameters.size() > 0)
37 return ROUTE_UNICAST(parameters[0]);
38 return ROUTE_LOCALONLY;
42 static const char* const lines[] = {
43 " -/\\- \2InspIRCd\2 -\\/-",
44 " November 2002 - Present",
46 "\2Core Developers\2:",
47 " Craig Edwards, Brain, <brain@inspircd.org>",
48 " Craig McLure, Craig, <craig@inspircd.org>",
49 " Robin Burchell, w00t, <w00t@inspircd.org>",
50 " Oliver Lupton, Om, <om@inspircd.org>",
51 " John Brooks, Special, <special@inspircd.org>",
52 " Dennis Friis, peavey, <peavey@inspircd.org>",
53 " Thomas Stagner, aquanight, <aquanight@inspircd.org>",
54 " Uli Schlachter, psychon, <psychon@inspircd.org>",
55 " Matt Smith, dz, <dz@inspircd.org>",
56 " Daniel De Graaf, danieldg, <danieldg@inspircd.org>",
57 " jackmcbarn, <jackmcbarn@inspircd.org>",
59 "\2Regular Contributors\2:",
60 " Majic MacGyver Namegduf Ankit",
63 "\2Other Contributors\2:",
64 " dmb Zaba skenmy GreenReaper",
65 " Dan Jason satmd owine",
66 " Adremelech John2 jilles HiroP",
67 " eggy Bricker AnMaster djGrrr",
68 " nenolod Quension praetorian pippijn",
70 "\2Former Contributors\2:",
71 " CC jamie typobox43 Burlex (win32)",
72 " Stskeeps ThaPrince BuildSmart Thunderhacker",
76 " searchirc.com irc-junkie.org Brik",
78 " Best experienced with: \2An IRC client\2",
84 CmdResult CommandInfo::Handle (const std::vector<std::string>& parameters, User *user)
86 if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName)
91 user->SendText(":%s %03d %s :%s", ServerInstance->Config->ServerName.c_str(), RPL_INFO, user->nick.c_str(), lines[i++]);
92 FOREACH_MOD(I_OnInfo,OnInfo(user));
93 user->SendText(":%s %03d %s :End of /INFO list", ServerInstance->Config->ServerName.c_str(), RPL_ENDOFINFO, user->nick.c_str());
97 COMMAND_INIT(CommandInfo)