diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-09-05 15:37:49 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-09-05 15:37:49 +0200 |
commit | 4ec37f1d2bf21f2edddec15e6d7c5570b37be214 (patch) | |
tree | cce0938600e42ed224fc2c9cc51d9f4f75c22ebc /src | |
parent | 60015ac53a076779bddbacd0b4ca15238d064b66 (diff) |
cmode_l Reject negative limits
Diffstat (limited to 'src')
-rw-r--r-- | src/modes/cmode_l.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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; } |