2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
6 * This file is part of InspIRCd. InspIRCd is free software: you can
7 * redistribute it and/or modify it under the terms of the GNU General Public
8 * License as published by the Free Software Foundation, version 2.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
26 class CommandAdmin : public Command
29 /** Holds the admin's name, for output in
32 std::string AdminName;
34 /** Holds the email address of the admin,
35 * for output in the /ADMIN command.
37 std::string AdminEmail;
39 /** Holds the admin's nickname, for output
40 * in the /ADMIN command
42 std::string AdminNick;
44 /** Constructor for admin.
46 CommandAdmin(Module* parent);
49 * @param parameters The parameters to the command
50 * @param user The user issuing the command
51 * @return A value from CmdResult to indicate command success or failure.
53 CmdResult Handle(const std::vector<std::string>& parameters, User* user);
54 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
59 class CommandCommands : public Command
62 /** Constructor for commands.
64 CommandCommands(Module* parent);
67 * @param parameters The parameters to the command
68 * @param user The user issuing the command
69 * @return A value from CmdResult to indicate command success or failure.
71 CmdResult Handle(const std::vector<std::string>& parameters, User* user);
76 class CommandInfo : public Command
79 /** Constructor for info.
81 CommandInfo(Module* parent);
84 * @param parameters The parameters to the command
85 * @param user The user issuing the command
86 * @return A value from CmdResult to indicate command success or failure.
88 CmdResult Handle(const std::vector<std::string>& parameters, User* user);
89 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
94 class CommandModules : public Command
97 /** Constructor for modules.
99 CommandModules(Module* parent);
102 * @param parameters The parameters to the command
103 * @param user The user issuing the command
104 * @return A value from CmdResult to indicate command success or failure.
106 CmdResult Handle(const std::vector<std::string>& parameters, User* user);
107 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
112 class CommandMotd : public Command
115 /** Constructor for motd.
117 CommandMotd(Module* parent);
120 * @param parameters The parameters to the command
121 * @param user The user issuing the command
122 * @return A value from CmdResult to indicate command success or failure.
124 CmdResult Handle(const std::vector<std::string>& parameters, User* user);
125 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
130 class CommandTime : public Command
133 /** Constructor for time.
135 CommandTime(Module* parent);
138 * @param parameters The parameters to the command
139 * @param user The user issuing the command
140 * @return A value from CmdResult to indicate command success or failure.
142 CmdResult Handle(const std::vector<std::string>& parameters, User* user);
143 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
148 class CommandVersion : public Command
151 /** Constructor for version.
153 CommandVersion(Module* parent);
156 * @param parameters The parameters to the command
157 * @param user The user issuing the command
158 * @return A value from CmdResult to indicate command success or failure.
160 CmdResult Handle(const std::vector<std::string>& parameters, User* user);