2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2008 Robin Burchell <robin+git@viroteck.net>
5 * Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
6 * Copyright (C) 2006 Craig Edwards <craigedwards@brainbox.cc>
8 * This file is part of InspIRCd. InspIRCd is free software: you can
9 * redistribute it and/or modify it under the terms of the GNU General Public
10 * License as published by the Free Software Foundation, version 2.
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
29 class ModeChannelBan : public ListModeBase
33 : ListModeBase(NULL, "ban", 'b', "End of channel ban list", 367, 368, true, "maxbans")
40 class ModeChannelInviteOnly : public SimpleChannelModeHandler
43 ModeChannelInviteOnly() : SimpleChannelModeHandler(NULL, "inviteonly", 'i')
50 class ModeChannelKey : public ModeHandler
54 ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding);
55 void RemoveMode(Channel* channel, irc::modestacker* stack = NULL);
56 void RemoveMode(User* user, irc::modestacker* stack = NULL);
62 class ModeChannelLimit : public ParamChannelModeHandler
66 bool ParamValidate(std::string& parameter);
67 bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel* channel);
72 class ModeChannelModerated : public SimpleChannelModeHandler
75 ModeChannelModerated() : SimpleChannelModeHandler(NULL, "moderated", 'm')
82 class ModeChannelNoExternal : public SimpleChannelModeHandler
85 ModeChannelNoExternal() : SimpleChannelModeHandler(NULL, "noextmsg", 'n')
92 class ModeChannelOp : public ModeHandler
97 ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding);
98 unsigned int GetPrefixRank();
99 void RemoveMode(Channel* channel, irc::modestacker* stack = NULL);
100 void RemoveMode(User* user, irc::modestacker* stack = NULL);
105 class ModeChannelPrivate : public SimpleChannelModeHandler
108 ModeChannelPrivate() : SimpleChannelModeHandler(NULL, "private", 'p')
115 class ModeChannelSecret : public SimpleChannelModeHandler
118 ModeChannelSecret() : SimpleChannelModeHandler(NULL, "secret", 's')
125 class ModeChannelTopicOps : public SimpleChannelModeHandler
128 ModeChannelTopicOps() : SimpleChannelModeHandler(NULL, "topiclock", 't')
135 class ModeChannelVoice : public ModeHandler
140 ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding);
141 unsigned int GetPrefixRank();
142 void RemoveMode(User* user, irc::modestacker* stack = NULL);
143 void RemoveMode(Channel* channel, irc::modestacker* stack = NULL);
148 class ModeUserInvisible : public SimpleUserModeHandler
151 ModeUserInvisible() : SimpleUserModeHandler(NULL, "invisible", 'i')
158 class ModeUserServerNoticeMask : public ModeHandler
161 ModeUserServerNoticeMask();
162 ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding);
163 void OnParameterMissing(User* user, User* dest, Channel* channel);
164 std::string GetUserParameter(User* user);
169 class ModeUserOperator : public ModeHandler
173 ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding);
178 class ModeUserWallops : public SimpleUserModeHandler
181 ModeUserWallops() : SimpleUserModeHandler(NULL, "wallops", 'w')