2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2018 linuxdaemon <linuxdaemon.irc@gmail.com>
5 * Copyright (C) 2017-2018 Sadie Powell <sadie@witchery.services>
6 * Copyright (C) 2014-2015, 2018 Attila Molnar <attilamolnar@hush.com>
8 * This file is part of InspIRCd. InspIRCd is free software: you can
9 * redistribute it and/or modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation, version 2.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 /** Send an ERROR to unregistered users and a NOTICE to all registered local users
29 * @param message Message to send
31 void SendError(const std::string& message);
36 class CommandDie : public Command
42 /** Constructor for die.
44 CommandDie(Module* parent, std::string& hashref);
47 * @param parameters The parameters to the command
48 * @param user The user issuing the command
49 * @return A value from CmdResult to indicate command success or failure.
51 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
56 class CommandKill : public Command
59 std::string killreason;
60 ClientProtocol::EventProvider protoev;
63 /** Set to a non empty string to obfuscate nicknames prepended to a KILL. */
66 /** Set to hide kills from clients of ulined servers in snotices. */
69 /** Constructor for kill.
71 CommandKill(Module* parent);
74 * @param user User issuing the command
75 * @param parameters Parameters to the command
76 * @return A value from CmdResult to indicate command success or failure.
78 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
80 RouteDescriptor GetRouting(User* user, const Params& parameters) CXX11_OVERRIDE;
82 void EncodeParameter(std::string& param, unsigned int index) CXX11_OVERRIDE;
87 class CommandOper : public SplitCommand
90 /** Constructor for oper.
92 CommandOper(Module* parent);
95 * @param user User issuing the command
96 * @param parameters Parameters to the command
97 * @return A value from CmdResult to indicate command success or failure.
99 CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE;
104 class CommandRehash : public Command
107 /** Constructor for rehash.
109 CommandRehash(Module* parent);
112 * @param user User issuing the command
113 * @param parameters Parameters to the command
114 * @return A value from CmdResult to indicate command success or failure.
116 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;
121 class CommandRestart : public Command
125 std::string password;
127 /** Constructor for restart.
129 CommandRestart(Module* parent, std::string& hashref);
132 * @param user User issuing the command
133 * @param parameters Parameters to the command
134 * @return A value from CmdResult to indicate command success or failure.
136 CmdResult Handle(User* user, const Params& parameters) CXX11_OVERRIDE;