X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodes%2Fcmode_l.cpp;h=d61b2597b40444da2574c176796293ee784c0402;hb=d23c030c9a8fd58807438245a004e4aa5b7288ba;hp=128854b50e94d19931736d9025ddfdfbbcb3d3dc;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modes/cmode_l.cpp b/src/modes/cmode_l.cpp index 128854b50..d61b2597b 100644 --- a/src/modes/cmode_l.cpp +++ b/src/modes/cmode_l.cpp @@ -20,9 +20,6 @@ #include "inspircd.h" -#include "mode.h" -#include "channels.h" -#include "users.h" #include "builtinmodes.h" ModeChannelLimit::ModeChannelLimit() @@ -38,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; }