View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002729 | unreal | ircd | public | 2005-12-27 15:57 | 2007-04-27 05:06 |
| Reporter | tabrisnet | Assigned To | |||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | closed | Resolution | wont fix | ||
| Product Version | 3.2.3 | ||||
| Summary | 0002729: loosen gline syntax? (was: default-bantime vs misparsed /gline entries) | ||||
| Description | Consider 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 | |||||
|
|
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. |
|
|
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. |
|
|
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. |
|
|
[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>" |
|
|
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. |
|
|
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. |
| 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 |
|
Status | new => closed |
| 2007-04-27 05:06 |
|
Resolution | open => wont fix |