View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002172 | unreal | ircd | public | 2004-11-12 00:54 | 2011-12-25 14:02 |
Reporter | Stealth | Assigned To | syzop | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.2.2 | ||||
Fixed in Version | 3.2.8 | ||||
Summary | 0002172: Admin block behavior | ||||
Description | If you have an admin block, and forget a semicolon on a line, Unreal will proceed to use the block with no error, but the information will be incorrect/incomplete. It will use the line with the missing semicolon, but will not use the following line. See Additional Information for example | ||||
Additional Information | Block: admin { "Location: Some Location, USA."; "Stealth Owner admin@***.org"; "Jen NetAdmin jen@***.org" "Sephiroth Admin todd@***.org"; }; Will put out: Administrative info about irc.***.net Location: Some Location, USA. Stealth Owner admin@***.org Jen NetAdmin jen@***.org | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
3rd party modules | |||||
|
Hmm, that's an interesting one. I'll need to think about how that can be solved. The reason it does that is because of the way the parser works. The parser separates things into name value pairs. Meaning password "mypassword" is name = password value = mypassword. So when you do: "abc" "def" it sees that as name = abc value = def. In essence, it said, name = "Jen NetAdmin jen@***.org" value = "Sephiroth Admin todd@***.org" and since Unreal is only looking at the names, the value is ignored. The same would likely happen for anything that uses flags, say oper::flags. Solving this, however, is actually going to be pretty difficult. I suppose the easiest solution would be to require the name and the value to be on the same line... |
|
An idea would be to have prople number the lines, like so: admin { 1 "Line 1"; 2 "line 2"; }; This may complicate things for people, but its a thought. <edit> Or perhaps make Unreal put out all names and values to the person issuing the /admin. </edit> |
|
That solves the problem for this one thing, not for everything. E.g., flags { admin netadmin; }; That would exhibit the same problem, and 1..N doesn't make sense for flags. |
|
I don't see the problem... you forget an ';' and then you blame Unreal? :p But anyway, I guess you (codemastr) want to make it more simple for users by removing this 'feature'? More on-topic, in this specific case, adding a warning for such a wrong admin { } block isn't too hard: --- ../cvs/Unreal3.2/src/s_conf.c 2004-11-09 21:56:02.000000000 +0100 +++ src/s_conf.c 2004-11-13 15:58:35.000000000 +0100 @@ -2902,6 +2902,14 @@ errors++; continue; } + if (cep->ce_vardata) + { + config_error("%s:%i: Wrong syntax or possibly missing ';' somewhere", + cep->ce_fileptr->cf_filename, + cep->ce_varlinenum); + errors++; + continue; + } } requiredstuff.conf_admin = 1; return errors; [or even a nice {#define} function for it ;p] |
|
Well yeah, that works, but it's kind of messy because the ; checking is actually done in the initial parsing. So it might confuse users. |
|
I would think after parsing the admin / flags block, if a field has a non-empty value string, trigger a config error (which looks to be what syzop suggested :p ). That would seem to be the simplest solution. :-) |
|
also note: you're missing a ; after the 3rd line in admin { } -- fez / Eric edit: syzop already caught that |
|
Bump. Still an issue? |
|
Tested on: ReleaseID (1.1.1.1.2.1.2.1.2.2234.2.626 2007/01/22 Still an issue. I've seen no warnings and a line from admin block was missing. |
|
The included patch takes care of this by doing the following: If (inside of a {..} block) there are quoted lines ending without semi-colons, it will treat them as if semi-colons are there, and alert the user that the semi-colon is missing so they can fix it. This fixes missing semicolons in admin{} blocks, and helped me discover about 5 errors in help.conf which was causing data not to be displayed. I think this should be committed, but I figured some of you might want to look over it first and make sure it's fine. |
|
Fixed in .2435 |
|
did not check the patch, but if this looks proper, then re-apply this patch in 3.3 :) |
|
Already fixed in 3.2.8 - 0002172 reported by Stealth, patched by WolfSage, fixing if you have an admin block, and forget a semicolon on a line, Unreal will proceed to use the block with no error, but the information will be incorrect/incomplete. [Backport, WolfSage] |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-11-12 00:54 | Stealth | New Issue | |
2004-11-12 15:00 |
|
Note Added: 0008280 | |
2004-11-12 17:14 | Stealth | Note Added: 0008283 | |
2004-11-12 17:16 | Stealth | Note Edited: 0008283 | |
2004-11-12 17:21 |
|
Note Added: 0008284 | |
2004-11-13 10:08 | syzop | Note Added: 0008289 | |
2004-11-13 12:13 |
|
Note Added: 0008297 | |
2004-11-14 17:25 | aquanight | Note Added: 0008325 | |
2004-11-16 19:39 | fez | Note Added: 0008352 | |
2004-11-16 19:41 | fez | Note Edited: 0008352 | |
2007-04-27 05:21 |
|
Note Added: 0013815 | |
2007-04-27 05:21 |
|
Status | new => feedback |
2007-04-27 05:33 | vonitsanet | Note Added: 0013822 | |
2007-04-27 06:34 |
|
Status | feedback => acknowledged |
2007-06-09 20:57 | WolfSage | File Added: s_conf.patch.txt | |
2007-06-09 21:02 | WolfSage | Note Added: 0014294 | |
2007-06-09 21:11 | WolfSage | Status | acknowledged => feedback |
2007-06-11 16:29 |
|
Status | feedback => resolved |
2007-06-11 16:29 |
|
Fixed in Version | => 3.3-alpha0 |
2007-06-11 16:29 |
|
Resolution | open => fixed |
2007-06-11 16:29 |
|
Assigned To | => stskeeps |
2007-06-11 16:29 |
|
Note Added: 0014330 | |
2011-07-19 17:52 | syzop | Note Added: 0016711 | |
2011-07-19 17:52 | syzop | Assigned To | stskeeps => |
2011-07-19 17:52 | syzop | Status | resolved => has patch |
2011-12-25 14:02 | syzop | Note Added: 0016829 | |
2011-12-25 14:02 | syzop | Status | has patch => resolved |
2011-12-25 14:02 | syzop | Fixed in Version | 3.3-alpha0 => 3.2.8 |
2011-12-25 14:02 | syzop | Assigned To | => syzop |