MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0000871 | Zandronum | [All Projects] Bug | public | 2012-06-10 18:48 | 2024-03-14 05:08 |
|
Reporter | Dusk | |
Assigned To | | |
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | unable to reproduce | |
Platform | | OS | | OS Version | |
Product Version | 1.0-beta | |
Target Version | | Fixed in Version | | |
|
Summary | 0000871: RCON users get SERVER_Printf'd messages twice |
Description | If a client with rcon access issues an rcon command that ends up calling SERVER_Printf to broadcast a message to clients, he'll get the message twice - once from the verbose output and another from the real broadcast.
Fix here:
'https://bitbucket.org/CrimsonDusk/neurosphere/changeset/9bbf7257d865 [^]'
'https://bitbucket.org/CrimsonDusk/neurosphere/changeset/6e34d2e66647 [^]' |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2012-06-10 18:48 | Dusk | New Issue | |
2012-06-10 18:48 | Dusk | Status | new => assigned |
2012-06-10 18:48 | Dusk | Assigned To | => Dusk |
2012-06-10 18:48 | Dusk | Status | assigned => needs review |
2012-06-10 19:01 | Dusk | Description Updated | bug_revision_view_page.php?rev_id=2049#r2049 |
2012-06-24 10:31 | Torr Samaho | Note Added: 0003835 | |
2012-06-24 10:31 | Torr Samaho | Status | needs review => feedback |
2012-06-24 10:42 | Torr Samaho | Note Edited: 0003835 | |
2012-06-24 10:42 | Torr Samaho | Note Edited: 0003835 | |
2012-06-24 10:43 | Torr Samaho | Note Edited: 0003835 | |
2012-06-24 10:44 | Torr Samaho | Note Edited: 0003835 | bug_revision_view_page.php?bugnote_id=3835#r2093 |
2012-06-24 10:44 | Torr Samaho | Note Revision Dropped: 3835: 0002089 | |
2012-06-24 10:44 | Torr Samaho | Note Revision Dropped: 3835: 0002090 | |
2012-06-24 10:45 | Torr Samaho | Note Revision Dropped: 3835: 0002091 | |
2012-06-24 10:45 | Torr Samaho | Note Revision Dropped: 3835: 0002092 | |
2012-06-24 11:00 | Dusk | Note Added: 0003837 | |
2012-06-24 11:00 | Dusk | Status | feedback => assigned |
2012-06-24 11:00 | Dusk | Status | assigned => feedback |
2012-06-24 11:47 | Torr Samaho | Note Added: 0003838 | |
2013-01-30 14:14 | Dusk | Note Added: 0005872 | |
2013-01-30 14:14 | Dusk | Status | feedback => assigned |
2013-01-30 14:14 | Dusk | Assigned To | Dusk => |
2013-01-30 14:14 | Dusk | Status | assigned => feedback |
2024-03-14 05:08 | Ru5tK1ng | Note Added: 0023391 | |
2024-03-14 05:08 | Ru5tK1ng | Status | feedback => closed |
2024-03-14 05:08 | Ru5tK1ng | Resolution | open => unable to reproduce |
Notes |
|
(0003835)
|
Torr Samaho
|
2012-06-24 10:31
(edited on: 2012-06-24 10:44) |
|
For the sake of consistency (CONSOLE_SetRCONPlayer already exists), instead of exporting g_ulRCONPlayer, the access function CONSOLE_GetRCONPlayer should be introduced.
Anyway, the whole constructing gets weird: We already have
SERVER_RCON_Printf( outlinecopy );
if ( g_ulRCONPlayer != MAXPLAYERS )
SERVER_PrintfPlayer( printlevel, g_ulRCONPlayer, outlinecopy );
and now you add an additional construction in SERVER_Printf to counter this. The existing construction deliberately prints messages twice for the RCON player, once with SERVER_RCON_Printf and once with SERVER_PrintfPlayer. So to me this behavior seems to be intentional and not a bug. Possibly I'm overlooking something here.
|
|
|
(0003837)
|
Dusk
|
2012-06-24 11:00
|
|
.. WTF?
How can something like this be intentional? I'm confused now. |
|
|
|
I didn't write any of this code, so I can just speculate about its intentions. The fragment from c_console.cpp I posted above apparently prints the messages twice, once with SERVER_RCON_Printf and once with SERVER_PrintfPlayer. I'd guess it makes a difference which of these functions is used to print a message.
If we come to the conclusion that this is wrong, we should fix it in that fragment. Since SERVER_RCON_Printf is only called once, we could move the ( g_ulRCONPlayer != MAXPLAYERS ) part into SERVER_RCON_Printf along with the logic you added at two other places. |
|
|
(0005872)
|
Dusk
|
2013-01-30 14:14
|
|
I think I might've been a bit vague with this: with RCON user I mean a client logged into RCON access with send_password and is issuing commands with the rcon command.
I also took a closer look into this now and I think SERVER_RCON_Printf has nothing to do with this. The code fragment in the first reply is in PrintString which is executed by all Printfs on the server, including SERVER_Printf. So if an RCON user sends a command to for instance change dmflags, SERVER_Printf broadcasts it to clients (including the RCON user) and logs it to the server console - which is then tee'd to the RCON user, thus he's getting it twice. |
|
|
|
I can't seem to reproduce this with puking or changing dmflags with 3.1. Closing ticket as a result of my findings. Feel free to reopen this if it's still an issue. |
|