X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcoremods%2Fcore_channel%2Fcmode_l.cpp;h=d3b806956320fb70a4e0bdbd2f3f8c7ee1c5a57c;hb=850b7a3ace862101a944a9332d72b6bd597c17cc;hp=eb16fd182da50821e6f84c52e0757b730118121f;hpb=565544fac966b14e046bb3042ab485f79bcf7c9e;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..d3b806956 100644 --- a/src/coremods/core_channel/cmode_l.cpp +++ b/src/coremods/core_channel/cmode_l.cpp @@ -24,7 +24,9 @@ ModeChannelLimit::ModeChannelLimit(Module* Creator) : ParamMode(Creator, "limit", 'l') + , minlimit(0) { + syntax = ""; } bool ModeChannelLimit::ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*) @@ -35,8 +37,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);