X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_l.cpp;h=d61b2597b40444da2574c176796293ee784c0402;hb=3b78613576364c4ac6a4e4af43a2eea056c8dd3f;hp=9121d64ec83521ed9891ec1b3a92ef8636f21af4;hpb=f62654a6859998f9d63eb22702c572d5ebcff15c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index 9121d64ec..d61b2597b 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -35,7 +35,11 @@ bool ModeChannelLimit::ResolveModeConflict(std::string &their_param, const std:: ModeAction ModeChannelLimit::OnSet(User* user, Channel* chan, std::string& parameter) { - ext.set(chan, ConvToInt(parameter)); + int limit = ConvToInt(parameter); + if (limit < 0) + return MODEACTION_DENY; + + ext.set(chan, limit); return MODEACTION_ALLOW; }