summaryrefslogtreecommitdiff
path: root/include/builtinmodes.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/builtinmodes.h')
-rw-r--r--include/builtinmodes.h77
1 files changed, 8 insertions, 69 deletions
diff --git a/include/builtinmodes.h b/include/builtinmodes.h
index e78e68b11..a77734ae3 100644
--- a/include/builtinmodes.h
+++ b/include/builtinmodes.h
@@ -35,20 +35,11 @@ class ModeChannelBan : public ListModeBase
}
};
-/** Channel mode +i
- */
-class ModeChannelInviteOnly : public SimpleChannelModeHandler
-{
- public:
- ModeChannelInviteOnly() : SimpleChannelModeHandler(NULL, "inviteonly", 'i')
- {
- }
-};
-
/** Channel mode +k
*/
class ModeChannelKey : public ParamMode<ModeChannelKey, LocalStringExt>
{
+ static const std::string::size_type maxkeylen = 32;
public:
ModeChannelKey();
ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string &parameter, bool adding);
@@ -67,61 +58,15 @@ class ModeChannelLimit : public ParamMode<ModeChannelLimit, LocalIntExt>
ModeAction OnSet(User* source, Channel* channel, std::string& parameter);
};
-/** Channel mode +m
- */
-class ModeChannelModerated : public SimpleChannelModeHandler
-{
- public:
- ModeChannelModerated() : SimpleChannelModeHandler(NULL, "moderated", 'm')
- {
- }
-};
-
-/** Channel mode +n
- */
-class ModeChannelNoExternal : public SimpleChannelModeHandler
-{
- public:
- ModeChannelNoExternal() : SimpleChannelModeHandler(NULL, "noextmsg", 'n')
- {
- }
-};
-
/** Channel mode +o
*/
class ModeChannelOp : public PrefixMode
{
public:
- ModeChannelOp();
-};
-
-/** Channel mode +p
- */
-class ModeChannelPrivate : public SimpleChannelModeHandler
-{
- public:
- ModeChannelPrivate() : SimpleChannelModeHandler(NULL, "private", 'p')
- {
- }
-};
-
-/** Channel mode +s
- */
-class ModeChannelSecret : public SimpleChannelModeHandler
-{
- public:
- ModeChannelSecret() : SimpleChannelModeHandler(NULL, "secret", 's')
- {
- }
-};
-
-/** Channel mode +t
- */
-class ModeChannelTopicOps : public SimpleChannelModeHandler
-{
- public:
- ModeChannelTopicOps() : SimpleChannelModeHandler(NULL, "topiclock", 't')
+ ModeChannelOp()
+ : PrefixMode(NULL, "op", 'o', OP_VALUE, '@')
{
+ levelrequired = OP_VALUE;
}
};
@@ -130,16 +75,10 @@ class ModeChannelTopicOps : public SimpleChannelModeHandler
class ModeChannelVoice : public PrefixMode
{
public:
- ModeChannelVoice();
-};
-
-/** User mode +i
- */
-class ModeUserInvisible : public SimpleUserModeHandler
-{
- public:
- ModeUserInvisible() : SimpleUserModeHandler(NULL, "invisible", 'i')
+ ModeChannelVoice()
+ : PrefixMode(NULL, "voice", 'v', VOICE_VALUE, '+')
{
+ levelrequired = HALFOP_VALUE;
}
};
@@ -165,7 +104,7 @@ class ModeUserServerNoticeMask : public ModeHandler
* @param user The user whose notice masks to format
* @return The notice mask character sequence
*/
- std::string GetUserParameter(User* user);
+ std::string GetUserParameter(const User* user) const CXX11_OVERRIDE;
};
/** User mode +o