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/>.
24 /** These commands require no parameters, but if there is a parameter it is a server name where the command will be routed to.
26 class ServerTargetCommand : public Command
29 ServerTargetCommand(Module* mod, const std::string& Name)
34 RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE;
39 class CommandAdmin : public ServerTargetCommand
42 /** Holds the admin's name, for output in
45 std::string AdminName;
47 /** Holds the email address of the admin,
48 * for output in the /ADMIN command.
50 std::string AdminEmail;
52 /** Holds the admin's nickname, for output
53 * in the /ADMIN command
55 std::string AdminNick;
57 /** Constructor for admin.
59 CommandAdmin(Module* parent);
62 * @param parameters The parameters to the command
63 * @param user The user issuing the command
64 * @return A value from CmdResult to indicate command success or failure.
66 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
71 class CommandCommands : public Command
74 /** Constructor for commands.
76 CommandCommands(Module* parent);
79 * @param parameters The parameters to the command
80 * @param user The user issuing the command
81 * @return A value from CmdResult to indicate command success or failure.
83 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
88 class CommandInfo : public ServerTargetCommand
91 /** Constructor for info.
93 CommandInfo(Module* parent);
96 * @param parameters The parameters to the command
97 * @param user The user issuing the command
98 * @return A value from CmdResult to indicate command success or failure.
100 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
105 class CommandModules : public ServerTargetCommand
108 /** Constructor for modules.
110 CommandModules(Module* parent);
113 * @param parameters The parameters to the command
114 * @param user The user issuing the command
115 * @return A value from CmdResult to indicate command success or failure.
117 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
122 class CommandMotd : public ServerTargetCommand
125 ConfigFileCache motds;
127 /** Constructor for motd.
129 CommandMotd(Module* parent);
132 * @param parameters The parameters to the command
133 * @param user The user issuing the command
134 * @return A value from CmdResult to indicate command success or failure.
136 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
141 class CommandTime : public ServerTargetCommand
144 /** Constructor for time.
146 CommandTime(Module* parent);
149 * @param parameters The parameters to the command
150 * @param user The user issuing the command
151 * @return A value from CmdResult to indicate command success or failure.
153 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
158 class CommandVersion : public Command
161 /** Constructor for version.
163 CommandVersion(Module* parent);
166 * @param parameters The parameters to the command
167 * @param user The user issuing the command
168 * @return A value from CmdResult to indicate command success or failure.
170 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;