2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2011 Jackmcbarn <jackmcbarn@jackmcbarn.no-ip.org>
5 * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
6 * Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
7 * Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
9 * This file is part of InspIRCd. InspIRCd is free software: you can
10 * redistribute it and/or modify it under the terms of the GNU General Public
11 * License as published by the Free Software Foundation, version 2.
13 * This program is distributed in the hope that it will be useful, but WITHOUT
14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 /** Handle /INFO. These command handlers can be reloaded by the core,
26 * and handle basic RFC1459 commands. Commands within modules work
27 * the same way, however, they can be fully unloaded, where these
30 class CommandInfo : public Command
33 /** Constructor for info.
35 CommandInfo(Module* parent) : Command(parent,"INFO")
38 syntax = "[<servername>]";
42 * @param parameters The parameters to the comamnd
43 * @param pcnt The number of parameters passed to teh command
44 * @param user The user issuing the command
45 * @return A value from CmdResult to indicate command success or failure.
47 CmdResult Handle(const std::vector<std::string>& parameters, User *user);
48 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
50 if (parameters.size() > 0)
51 return ROUTE_UNICAST(parameters[0]);
52 return ROUTE_LOCALONLY;
56 static const char* const lines[] = {
57 " -/\\- \2InspIRCd\2 -\\/-",
58 " November 2002 - Present",
60 "\2Core Developers\2:",
61 " Craig Edwards, Brain, <brain@inspircd.org>",
62 " Craig McLure, Craig, <craig@inspircd.org>",
63 " Robin Burchell, w00t, <w00t@inspircd.org>",
64 " Oliver Lupton, Om, <om@inspircd.org>",
65 " John Brooks, Special, <special@inspircd.org>",
66 " Dennis Friis, peavey, <peavey@inspircd.org>",
67 " Thomas Stagner, aquanight, <aquanight@inspircd.org>",
68 " Uli Schlachter, psychon, <psychon@inspircd.org>",
69 " Matt Smith, dz, <dz@inspircd.org>",
70 " Daniel De Graaf, danieldg, <danieldg@inspircd.org>",
71 " jackmcbarn, <jackmcbarn@inspircd.org>",
72 " Attila Molnar, Attila, <attilamolnar@hush.com>",
74 "\2Regular Contributors\2:",
77 "\2Other Contributors\2:",
78 " ChrisTX Shawn Shutter",
80 "\2Former Contributors\2:",
81 " dmb Zaba skenmy GreenReaper",
82 " Dan Jason satmd owine",
83 " Adremelech John2 jilles HiroP",
84 " eggy Bricker AnMaster djGrrr",
85 " nenolod Quension praetorian pippijn",
86 " CC jamie typobox43 Burlex (win32)",
87 " Stskeeps ThaPrince BuildSmart Thunderhacker",
88 " Skip LeaChim Majic MacGyver",
89 " Namegduf Ankit Phoenix Taros",
92 " searchirc.com irc-junkie.org Brik fraggeln",
94 " Best experienced with: \2An IRC client\2",
100 CmdResult CommandInfo::Handle (const std::vector<std::string>& parameters, User *user)
102 if (parameters.size() > 0 && parameters[0] != ServerInstance->Config->ServerName)
107 user->SendText(":%s %03d %s :%s", ServerInstance->Config->ServerName.c_str(), RPL_INFO, user->nick.c_str(), lines[i++]);
108 FOREACH_MOD(OnInfo, (user));
109 user->SendText(":%s %03d %s :End of /INFO list", ServerInstance->Config->ServerName.c_str(), RPL_ENDOFINFO, user->nick.c_str());
113 COMMAND_INIT(CommandInfo)