X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fbuiltinmodes.h;h=49198b650b1eacdbc91ac60cb44581f2de9fd0e0;hb=7f7ffef3b4d5dc6242918a48713d6fab96928a80;hp=96838ce5e4e7307fe668afb32ff3dcd60e510046;hpb=3a3ff949670c61a4a8856e1391222e156eb1cd17;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/builtinmodes.h b/include/builtinmodes.h index 96838ce5e..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); @@ -65,7 +66,7 @@ class ModeChannelOp : public PrefixMode ModeChannelOp() : PrefixMode(NULL, "op", 'o', OP_VALUE, '@') { - levelrequired = OP_VALUE; + ranktoset = ranktounset = OP_VALUE; } }; @@ -77,7 +78,8 @@ class ModeChannelVoice : public PrefixMode ModeChannelVoice() : PrefixMode(NULL, "voice", 'v', VOICE_VALUE, '+') { - levelrequired = HALFOP_VALUE; + selfremove = false; + ranktoset = ranktounset = HALFOP_VALUE; } }; @@ -96,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