]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/coremods/core_info/core_info.h
Merge insp20
[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 /** Handle /ADMIN.
25  */
26 class CommandAdmin : public Command
27 {
28  public:
29         /** Holds the admin's name, for output in
30          * the /ADMIN command.
31          */
32         std::string AdminName;
33
34         /** Holds the email address of the admin,
35          * for output in the /ADMIN command.
36          */
37         std::string AdminEmail;
38
39         /** Holds the admin's nickname, for output
40          * in the /ADMIN command
41          */
42         std::string AdminNick;
43
44         /** Constructor for admin.
45          */
46         CommandAdmin(Module* parent);
47
48         /** Handle command.
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.
52          */
53         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
54         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
55 };
56
57 /** Handle /COMMANDS.
58  */
59 class CommandCommands : public Command
60 {
61  public:
62         /** Constructor for commands.
63          */
64         CommandCommands(Module* parent);
65
66         /** Handle command.
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.
70          */
71         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
72 };
73
74 /** Handle /INFO.
75  */
76 class CommandInfo : public Command
77 {
78  public:
79         /** Constructor for info.
80          */
81         CommandInfo(Module* parent);
82
83         /** Handle command.
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.
87          */
88         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
89         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
90 };
91
92 /** Handle /MODULES.
93  */
94 class CommandModules : public Command
95 {
96  public:
97         /** Constructor for modules.
98          */
99         CommandModules(Module* parent);
100
101         /** Handle command.
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.
105          */
106         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
107         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
108 };
109
110 /** Handle /MOTD.
111  */
112 class CommandMotd : public Command
113 {
114  public:
115         /** Constructor for motd.
116          */
117         CommandMotd(Module* parent);
118
119         /** Handle command.
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.
123          */
124         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
125         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
126 };
127
128 /** Handle /TIME.
129  */
130 class CommandTime : public Command
131 {
132  public:
133         /** Constructor for time.
134          */
135         CommandTime(Module* parent);
136
137         /** Handle command.
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.
141          */
142         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
143         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
144 };
145
146 /** Handle /VERSION.
147  */
148 class CommandVersion : public Command
149 {
150  public:
151         /** Constructor for version.
152          */
153         CommandVersion(Module* parent);
154
155         /** Handle command.
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.
159          */
160         CmdResult Handle(const std::vector<std::string>& parameters, User* user);
161 };