X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_channel%2Fcmode_l.cpp;h=e71eb500e01ace4b363596c650bdde69493d38fd;hb=c4955b78dced7bc399135fc64c14750f2dfc0a2b;hp=eb16fd182da50821e6f84c52e0757b730118121f;hpb=17ee4cd4863aa4e6368916d858cbd1f5fdbe36ec;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/coremods/core_channel/cmode_l.cpp b/src/coremods/core_channel/cmode_l.cpp index eb16fd182..e71eb500e 100644 --- a/src/coremods/core_channel/cmode_l.cpp +++ b/src/coremods/core_channel/cmode_l.cpp @@ -24,6 +24,7 @@ ModeChannelLimit::ModeChannelLimit(Module* Creator) : ParamMode(Creator, "limit", 'l') + , minlimit(0) { } @@ -35,8 +36,8 @@ bool ModeChannelLimit::ResolveModeConflict(std::string &their_param, const std:: ModeAction ModeChannelLimit::OnSet(User* user, Channel* chan, std::string& parameter) { - int limit = ConvToInt(parameter); - if (limit < 0) + size_t limit = ConvToNum(parameter); + if (limit < minlimit) return MODEACTION_DENY; ext.set(chan, limit);