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 /** Send an ERROR to unregistered users and a NOTICE to all registered local users
27 * @param message Message to send
29 void SendError(const std::string& message);
34 class CommandDie : public Command
40 /** Constructor for die.
42 CommandDie(Module* parent, std::string& hashref);
45 * @param parameters The parameters to the command
46 * @param user The user issuing the command
47 * @return A value from CmdResult to indicate command success or failure.
49 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
54 class CommandKill : public Command
57 std::string killreason;
58 ClientProtocol::EventProvider protoev;
61 /** Set to a non empty string to obfuscate nicknames prepended to a KILL. */
64 /** Set to hide kills from clients of ulined servers in snotices. */
67 /** Constructor for kill.
69 CommandKill(Module* parent);
72 * @param user User issuing the command
73 * @param parameters Parameters to the command
74 * @return A value from CmdResult to indicate command success or failure.
76 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
78 RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE;
80 void EncodeParameter(std::string& param, unsigned int index) CXX11_OVERRIDE;
85 class CommandOper : public SplitCommand
88 /** Constructor for oper.
90 CommandOper(Module* parent);
93 * @param user User issuing the command
94 * @param parameters Parameters to the command
95 * @return A value from CmdResult to indicate command success or failure.
97 CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE;
102 class CommandRehash : public Command
105 /** Constructor for rehash.
107 CommandRehash(Module* parent);
110 * @param user User issuing the command
111 * @param parameters Parameters to the command
112 * @return A value from CmdResult to indicate command success or failure.
114 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
119 class CommandRestart : public Command
123 std::string password;
125 /** Constructor for restart.
127 CommandRestart(Module* parent, std::string& hashref);
130 * @param user User issuing the command
131 * @param parameters Parameters to the command
132 * @return A value from CmdResult to indicate command success or failure.
134 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;