]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/coremods/core_channel/core_channel.h
Make the build reproducible by removing time related macros.
[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 #include "modules/exemption.h"
24
25 namespace Topic
26 {
27         void ShowTopic(LocalUser* user, Channel* chan);
28 }
29
30 namespace Invite
31 {
32         class APIImpl;
33 }
34
35 /** Handle /INVITE.
36  */
37 class CommandInvite : public Command
38 {
39         Invite::APIImpl& invapi;
40
41  public:
42         /** Constructor for invite.
43          */
44         CommandInvite(Module* parent, Invite::APIImpl& invapiimpl);
45
46         /** Handle command.
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.
50          */
51         CmdResult Handle(const std::vector<std::string>& parameters, User*user);
52         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
53 };
54
55 /** Handle /JOIN.
56  */
57 class CommandJoin : public SplitCommand
58 {
59  public:
60         /** Constructor for join.
61          */
62         CommandJoin(Module* parent);
63
64         /** Handle command.
65          * @param parameters The parameters to the command
66          * @param user The user issuing the command
67          * @return A value from CmdResult to indicate command success or failure.
68          */
69         CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user);
70 };
71
72 /** Handle /TOPIC.
73  */
74 class CommandTopic : public SplitCommand
75 {
76         CheckExemption::EventProvider exemptionprov;
77         ChanModeReference secretmode;
78         ChanModeReference topiclockmode;
79
80  public:
81         /** Constructor for topic.
82          */
83         CommandTopic(Module* parent);
84
85         /** Handle command.
86          * @param parameters The parameters to the command
87          * @param user The user issuing the command
88          * @return A value from CmdResult to indicate command success or failure.
89          */
90         CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user);
91 };
92
93 /** Handle /NAMES.
94  */
95 class CommandNames : public SplitCommand
96 {
97         ChanModeReference secretmode;
98         ChanModeReference privatemode;
99         UserModeReference invisiblemode;
100
101  public:
102         /** Constructor for names.
103          */
104         CommandNames(Module* parent);
105
106         /** Handle command.
107          * @param parameters The parameters to the command
108          * @param user The user issuing the command
109          * @return A value from CmdResult to indicate command success or failure.
110          */
111         CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user);
112
113         /** Spool the NAMES list for a given channel to the given user
114          * @param user User to spool the NAMES list to
115          * @param chan Channel whose nicklist to send
116          * @param show_invisible True to show invisible (+i) members to the user, false to omit them from the list
117          */
118         void SendNames(LocalUser* user, Channel* chan, bool show_invisible);
119 };
120
121 /** Handle /KICK.
122  */
123 class CommandKick : public Command
124 {
125  public:
126         /** Constructor for kick.
127          */
128         CommandKick(Module* parent);
129
130         /** Handle command.
131          * @param parameters The parameters to the command
132          * @param user The user issuing the command
133          * @return A value from CmdResult to indicate command success or failure.
134          */
135         CmdResult Handle(const std::vector<std::string>& parameters, User *user);
136         RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters);
137 };