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