2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
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.
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
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/>.
23 #include "modules/exemption.h"
27 void ShowTopic(LocalUser* user, Channel* chan);
37 class CommandInvite : public Command
39 Invite::APIImpl& invapi;
42 /** Constructor for invite.
44 CommandInvite(Module* parent, Invite::APIImpl& invapiimpl);
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.
51 CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
52 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) CXX11_OVERRIDE;
57 class CommandJoin : public SplitCommand
60 /** Constructor for join.
62 CommandJoin(Module* parent);
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.
69 CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user) CXX11_OVERRIDE;
74 class CommandTopic : public SplitCommand
76 CheckExemption::EventProvider exemptionprov;
77 ChanModeReference secretmode;
78 ChanModeReference topiclockmode;
81 /** Constructor for topic.
83 CommandTopic(Module* parent);
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.
90 CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user) CXX11_OVERRIDE;
95 class CommandNames : public SplitCommand
97 ChanModeReference secretmode;
98 ChanModeReference privatemode;
99 UserModeReference invisiblemode;
102 /** Constructor for names.
104 CommandNames(Module* parent);
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.
111 CmdResult HandleLocal(const std::vector<std::string>& parameters, LocalUser* user) CXX11_OVERRIDE;
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
118 void SendNames(LocalUser* user, Channel* chan, bool show_invisible);
123 class CommandKick : public Command
126 /** Constructor for kick.
128 CommandKick(Module* parent);
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.
135 CmdResult Handle(const std::vector<std::string>& parameters, User* user) CXX11_OVERRIDE;
136 RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) CXX11_OVERRIDE;