View Issue Details

IDProjectCategoryView StatusLast Update
0002729unrealircdpublic2007-04-27 05:06
Reportertabrisnet Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status closedResolutionwont fix 
Product Version3.2.3 
Summary0002729: loosen gline syntax? (was: default-bantime vs misparsed /gline entries)
DescriptionConsider the following:
/gline [email protected] :this is a test
/gline [email protected] this is a test

the first will set a gline with the expiry set to default-bantime
the second will set a gline with reason 'is a test', the 'this' discarded/misparsed as the expiration param, and the expiry set to 0 (permanent).

I know that personally I do /gline [email protected] +24h :Mr-Idiot: you need to grow up.

However many do not, and will do like the above, and the first token after the mask is misparsed. This often means that I end up having to talk to my opers, and I think I'm realizing it's not that they're setting perm glines, but they're forgetting to set the time at all, and do not know the : delimiter.
Steps To Reproduce/gline [email protected] this is a test

and end up with a Permanent G:line
3rd party modules

Activities

syzop

2005-12-27 15:59

administrator   ~0010897

Hm, what's the bug? :P

The syntax is
/gline <mask> <time> <reason>

So for a perm gline you need: /gline <mask> 0 <reason>

There's not much we can do to fix such invalid usage.

syzop

2005-12-27 16:03

administrator   ~0010898

Oh ok (didn't notice the bugtitle), ehm.. what's your suggestion? Because I'm afraid there isn't one (technical wise).

As for your 1st comment
'the first will set a gline with the expiry set to default-bantime'
that is correct, but the reason will be the default reason, not 'this is a test', because 'this is a test' is parsed as a time parameter.

tabrisnet

2005-12-27 16:06

reporter   ~0010899

I _do not_ want the perm gline. I want that if there is no (valid) time-spec, that it should go to default-bantime.

I admit that the syntax is clear to me, but it is not to many others I know, and I believe that it is possible to improve the parsing.

I think that many people believe it is /gline <mask> [time] [reason], esp as that is actually doable, and accepted by the ircd.
/gline blah@*.fake.tld

It should be doable to see that the [time] param does not start with a number, and thus should not be considered a number/timespec.

syzop

2005-12-27 16:08

administrator   ~0010900

Last edited: 2005-12-27 16:10

[quote]It should be doable to see that the [time] param does not start with a number, and thus should not be considered a number/timespec.[/quote]

You just said you used +24h for that, so that would be then become invalid.

EDIT: Ehm, I mean.. it will be seen as a reason, so it will end up being a defaulttime gline with the reason "+24 <rest of your text>"

tabrisnet

2005-12-27 16:41

reporter   ~0010901

yes, but you could also allow the +, or a number. !strcmp(param[0], '+') || isdigit(param[0]). I've done similar things in my code for handling time params, to differentiate whether or not it should be considered a timespec vs a word.

also, 'this is a test' is not parsed as the time param, only the word 'this' is, the 'is a test' is passed along as the reason.

I'm trying to stop breaking the aparrent expectation of opers (principle of least surprise). my alternative is to keep beating my opers with elm branches until they learn.

syzop

2005-12-27 16:55

administrator   ~0010902

I'm pretty sure my friend codemastr will say something along these lines:
if an oper cannot remember such a simple syntax, he shouldn't be oper. and second, if we do such things for this, there will be countless others... we can keep going on forever.

Which, is also a good point (the 2nd one, mainly).

I'll keep it open, for some discussion / thoughts ;p.

Thanks for bringing this up though.

Issue History

Date Modified Username Field Change
2005-12-27 15:57 tabrisnet New Issue
2005-12-27 15:59 syzop Note Added: 0010897
2005-12-27 16:03 syzop Note Added: 0010898
2005-12-27 16:06 tabrisnet Note Added: 0010899
2005-12-27 16:08 syzop Note Added: 0010900
2005-12-27 16:10 syzop Note Edited: 0010900
2005-12-27 16:41 tabrisnet Note Added: 0010901
2005-12-27 16:55 syzop Note Added: 0010902
2005-12-27 17:30 syzop Summary default-bantime vs misparsed /gline entries => loosen gline syntax (was: default-bantime vs misparsed /gline entries)
2005-12-27 17:31 syzop Severity minor => tweak
2005-12-27 17:31 syzop Summary loosen gline syntax (was: default-bantime vs misparsed /gline entries) => loosen gline syntax? (was: default-bantime vs misparsed /gline entries)
2007-04-27 05:06 stskeeps Status new => closed
2007-04-27 05:06 stskeeps Resolution open => wont fix