]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/coremods/core_info/core_info.h
Add the override keyword in places that it is missing.
[user/henk/code/inspircd.git] / src / coremods / core_info / core_info.h
1 /*
2  * InspIRCd -- Internet Relay Chat Daemon
3  *
4  *   Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
5  *
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.
9  *
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
13  * details.
14  *
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/>.
17  */
18
19
20 #pragma once
21
22 #include "inspircd.h"
23
24 /** These commands require no parameters, but if there is a parameter it is a server name where the command will be routed to.
25  */
26 class ServerTargetCommand : public Command
27 {
28  public:
29         ServerTargetCommand(Module* mod, const std::string& Name)
30                 : Command(mod, Name)
31         {
32         }
33
34         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) CXX11_OVERRIDE;
35 };
36
37 /** Handle /ADMIN.
38  */
39 class CommandAdmin : public ServerTargetCommand
40 {
41  public:
42         /** Holds the admin's name, for output in
43          * the /ADMIN command.
44          */
45         std::string AdminName;
46
47         /** Holds the email address of the admin,
48          * for output in the /ADMIN command.
49          */
50         std::string AdminEmail;
51
52         /** Holds the admin's nickname, for output
53          * in the /ADMIN command
54          */
55         std::string AdminNick;
56
57         /** Constructor for admin.
58          */
59         CommandAdmin(Module* parent);
60
61         /** Handle command.
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.
65          */
66         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
67 };
68
69 /** Handle /COMMANDS.
70  */
71 class CommandCommands : public Command
72 {
73  public:
74         /** Constructor for commands.
75          */
76         CommandCommands(Module* parent);
77
78         /** Handle command.
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.
82          */
83         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
84 };
85
86 /** Handle /INFO.
87  */
88 class CommandInfo : public ServerTargetCommand
89 {
90  public:
91         /** Constructor for info.
92          */
93         CommandInfo(Module* parent);
94
95         /** Handle command.
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.
99          */
100         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
101 };
102
103 /** Handle /MODULES.
104  */
105 class CommandModules : public ServerTargetCommand
106 {
107  public:
108         /** Constructor for modules.
109          */
110         CommandModules(Module* parent);
111
112         /** Handle command.
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.
116          */
117         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
118 };
119
120 /** Handle /MOTD.
121  */
122 class CommandMotd : public ServerTargetCommand
123 {
124  public:
125         /** Constructor for motd.
126          */
127         CommandMotd(Module* parent);
128
129         /** Handle command.
130          * @param parameters The parameters to the command
131          * @param user The user issuing the command
132          * @return A value from CmdResult to indicate command success or failure.
133          */
134         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
135 };
136
137 /** Handle /TIME.
138  */
139 class CommandTime : public ServerTargetCommand
140 {
141  public:
142         /** Constructor for time.
143          */
144         CommandTime(Module* parent);
145
146         /** Handle command.
147          * @param parameters The parameters to the command
148          * @param user The user issuing the command
149          * @return A value from CmdResult to indicate command success or failure.
150          */
151         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
152 };
153
154 /** Handle /VERSION.
155  */
156 class CommandVersion : public Command
157 {
158  public:
159         /** Constructor for version.
160          */
161         CommandVersion(Module* parent);
162
163         /** Handle command.
164          * @param parameters The parameters to the command
165          * @param user The user issuing the command
166          * @return A value from CmdResult to indicate command success or failure.
167          */
168         CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
169 };