]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/coremods/core_channel/core_channel.h
Add channel TS to server-to-server INVITE to detect and drop unauthorized invites
[user/henk/code/inspircd.git] / src / coremods / core_channel / core_channel.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 /INVITE.
25  */
26 class CommandInvite : public Command
27 {
28  public:
29         /** Constructor for invite.
30          */
31         CommandInvite (Module* parent);
32
33         /** Handle command.
34          * @param parameters The parameters to the command
35          * @param user The user issuing the command
36          * @return A value from CmdResult to indicate command success or failure.
37          */
38         CmdResult Handle(const std::vector<std::string>& parameters, User*user);
39         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
40 };
41
42 /** Handle /JOIN.
43  */
44 class CommandJoin : public SplitCommand
45 {
46  public:
47         /** Constructor for join.
48          */
49         CommandJoin(Module* parent);
50
51         /** Handle command.
52          * @param parameters The parameters to the command
53          * @param user The user issuing the command
54          * @return A value from CmdResult to indicate command success or failure.
55          */
56         CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user);
57 };
58
59 /** Handle /TOPIC.
60  */
61 class CommandTopic : public SplitCommand
62 {
63         ChanModeReference secretmode;
64         ChanModeReference topiclockmode;
65
66  public:
67         /** Constructor for topic.
68          */
69         CommandTopic(Module* parent);
70
71         /** Handle command.
72          * @param parameters The parameters to the command
73          * @param user The user issuing the command
74          * @return A value from CmdResult to indicate command success or failure.
75          */
76         CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user);
77 };
78
79 /** Handle /NAMES.
80  */
81 class CommandNames : public Command
82 {
83         ChanModeReference secretmode;
84
85  public:
86         /** Constructor for names.
87          */
88         CommandNames(Module* parent);
89
90         /** Handle command.
91          * @param parameters The parameters to the command
92          * @param user The user issuing the command
93          * @return A value from CmdResult to indicate command success or failure.
94          */
95         CmdResult Handle(const std::vector<std::string>& parameters, User *user);
96 };
97
98 /** Handle /KICK.
99  */
100 class CommandKick : public Command
101 {
102  public:
103         /** Constructor for kick.
104          */
105         CommandKick(Module* parent);
106
107         /** Handle command.
108          * @param parameters The parameters to the command
109          * @param user The user issuing the command
110          * @return A value from CmdResult to indicate command success or failure.
111          */
112         CmdResult Handle(const std::vector<std::string>& parameters, User *user);
113         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
114 };