X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fbuiltinmodes.h;h=49198b650b1eacdbc91ac60cb44581f2de9fd0e0;hb=451e687f681ccab5c02a8de1a7d59b324efbfe08;hp=26e38204aba31cf35bb5744ae71367e0cbe95989;hpb=00660293338f6a78278e52d05f6cf9a7ef9acc64;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/builtinmodes.h b/include/builtinmodes.h index 26e38204a..49198b650 100644 --- a/include/builtinmodes.h +++ b/include/builtinmodes.h @@ -39,6 +39,7 @@ class ModeChannelBan : public ListModeBase */ class ModeChannelKey : public ParamMode { + static const std::string::size_type maxkeylen = 32; public: ModeChannelKey(); ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); @@ -62,7 +63,11 @@ class ModeChannelLimit : public ParamMode class ModeChannelOp : public PrefixMode { public: - ModeChannelOp(); + ModeChannelOp() + : PrefixMode(NULL, "op", 'o', OP_VALUE, '@') + { + ranktoset = ranktounset = OP_VALUE; + } }; /** Channel mode +v @@ -70,7 +75,12 @@ class ModeChannelOp : public PrefixMode class ModeChannelVoice : public PrefixMode { public: - ModeChannelVoice(); + ModeChannelVoice() + : PrefixMode(NULL, "voice", 'v', VOICE_VALUE, '+') + { + selfremove = false; + ranktoset = ranktounset = HALFOP_VALUE; + } }; /** User mode +s @@ -88,14 +98,14 @@ class ModeUserServerNoticeMask : public ModeHandler public: ModeUserServerNoticeMask(); - ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding); - void OnParameterMissing(User* user, User* dest, Channel* channel); + ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding) CXX11_OVERRIDE; + void OnParameterMissing(User* user, User* dest, Channel* channel) CXX11_OVERRIDE; /** Create a displayable mode string of the snomasks set on a given user * @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