Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

mode +l: do not accept a limit of 0 #451

Open
wants to merge 1 commit into from

3 participants

@kaniini

RFC1459 must be interpreted as assuming '+l 0' is equivilant to -l. This
agrees with the interpretation in RFC2811 (section 4.2.9).

Furthermore, original IRCd derivatives do not accept '+l 0'. Thusly,
I believe strongly that InspIRCd should not either as the behaviour of
'+l 0' is technically undefined.

(ref atheme/atheme#115)

@kaniini kaniini mode +l: do not accept a limit of 0
RFC1459 must be interpreted as assuming '+l 0' is equivilant to -l.  This
agrees with the interpretation in RFC2811 (section 4.2.9).

Furthermore, original IRCd derivatives do not accept '+l 0'.  Thusly,
I believe strongly that InspIRCd should not either as the behaviour of
'+l 0' is technically undefined.

(ref atheme/atheme#115)
5c6d36e
@kaniini

Rebased automatically ontop of master, closes #450

@CuleX

IMO, but that's just me, we really should stick to RFC1459 at least. So if RFC1459 says +l 0 = -l. However, I can't seem to spot where RFC1459 defines that. RFC281* aren't followed enough to warrant a change.

If the behavior is changed, however, we do need a configuration option to restore the current InspIRCd behavior for compatibility reasons.

@attilamolnar
Owner

@mogri fixing this isn't as trivial as this patch because of the possible desync pointed out by @CuleX, however I'll keep this open so it won't be forgotten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2013
  1. @kaniini

    mode +l: do not accept a limit of 0

    kaniini authored
    RFC1459 must be interpreted as assuming '+l 0' is equivilant to -l.  This
    agrees with the interpretation in RFC2811 (section 4.2.9).
    
    Furthermore, original IRCd derivatives do not accept '+l 0'.  Thusly,
    I believe strongly that InspIRCd should not either as the behaviour of
    '+l 0' is technically undefined.
    
    (ref atheme/atheme#115)
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/modes/cmode_l.cpp
View
2  src/modes/cmode_l.cpp
@@ -39,7 +39,7 @@ bool ModeChannelLimit::ParamValidate(std::string &parameter)
{
int limit = atoi(parameter.c_str());
- if (limit < 0)
+ if (limit < 1)
return false;
parameter = ConvToStr(limit);
Something went wrong with that request. Please try again.