MantisBT - Zandronum
View Issue Details
0001209Zandronum[All Projects] Bugpublic2012-12-09 16:452018-09-30 22:05
ZzZombo 
Dusk 
normalmajoralways
closedfixed 
1.0 
3.03.0 
0001209: Banning, kicking and muting by idx
If you invoke ban_idx. kick_idx. kickfromgame_idx, ignore_idx/unignore_idx with idx set to an invalid value the game will perform the given command on player with idx of 0. It can cause troubles if you, for example, ban an innocent because mistyped a single letter in the console.
Run a server, connect a client, then issue some of commands above like "kick_idx q cheater" and see what client will leave the game.
No tags attached.
Issue History
2012-12-09 16:45ZzZomboNew Issue
2012-12-09 18:58DuskAssigned To => Dusk
2012-12-09 18:58DuskStatusnew => assigned
2013-09-27 10:39DuskStatusassigned => confirmed
2016-02-11 17:20DuskNote Added: 0014423
2016-02-11 17:20DuskStatusconfirmed => needs review
2016-02-14 15:46Torr SamahoNote Added: 0014439
2016-02-14 15:46Torr SamahoStatusneeds review => feedback
2016-02-22 19:06DuskStatusfeedback => needs review
2016-02-27 09:46cobaltStatusneeds review => needs testing
2016-02-27 09:46cobaltTarget Version => 3.0
2016-02-27 09:46cobaltNote Added: 0014502
2016-03-01 22:21Ru5tK1ngNote Added: 0014531
2016-03-01 22:22Ru5tK1ngStatusneeds testing => resolved
2016-03-01 22:22Ru5tK1ngResolutionopen => fixed
2016-03-01 22:22Ru5tK1ngFixed in Version => 3.0
2018-09-30 22:05Blzut3Statusresolved => closed

Notes
(0014423)
Dusk   
2016-02-11 17:20   
Finally got around to doing this one as well:'https://bitbucket.org/Torr_Samaho/zandronum/pull-requests/66 [^]'
(0014439)
Torr Samaho   
2016-02-14 15:46   
Please see my comments on bitbucket.
(0014502)
cobalt   
2016-02-27 09:46   
Issue addressed by commit 4da35534b410: Using a bad player index for the various index-based console commands such as ban_idx now raises an error instead of assuming player 0, fixes 1209
Committed by Teemu Piippo [Dusk] on Wednesday 31 December 1969 23:59:57

Changes in files:

 docs/zandronum-history.txt | 1 +
 src/c_dispatch.cpp | 22 ++++++++++++++++++++++
 src/c_dispatch.h | 3 +++
 src/chat.cpp | 20 ++++++++++++--------
 src/sv_ban.cpp | 18 +++++++++++-------
 src/sv_main.cpp | 16 ++++++++++------
 6 files changed, 59 insertions(+), 21 deletions(-)

(0014531)
Ru5tK1ng   
2016-03-01 22:21   
I tried kicking, banning, ignoring and forcespec by idx with an invalid index and no player was affected. I was given a proper error message in the console.

Seems to be fixed with the latest build.