<!--quoteo(post=1953511:date=Jul 24 2012, 02:53 PM:name=Ryne)--><div class='quotetop'>QUOTE (Ryne @ Jul 24 2012, 02:53 PM) <a href="index.php?act=findpost&pid=1953511"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Why do the player "Game ID"s change so frequently? At least 3 times Ive typed sv_status, found the player I want to kick, typed "sv_kick ##" just to kick the wrong person due to ID shift.
Edit: this post is dedicated to Locke, a victim of two mis-kickings<!--QuoteEnd--></div><!--QuoteEEnd-->
This is still a prevalent issue....just accidentally kicked TWO people when trying to kick someone else. sv_status, get ID, sv_kick ....oh someone else got kicked. sv_status, get ID, oh someone else got kicked again...
Have an array of Steam-Ids, if a client joins with a Steam-Id not yet in that array, append it to the end. The array-index of the client's Steam-Id will be the client's Overmind-Id (or whatever you will want to call it for this admin-system).
Clear advantages here are: * The array will be destroyed upon destruction of the Lua-VM (or simply put, a map-change), which means it will usually never grow past 100, so these Overmind-Ids will usually only be 2 digits, making it very easy for admins to type * The association between the Steam-Id and Overmind-Id persists even after the client has disconnected, so the client can never escape your ban-command (even after disconnecting and rejoining, the client's Overmind-Id will be the same).
Interestingly enough, I put that in to work around the lack of Steam-Ids (in the Lua-scripts) when I first built GameOvermind, as banning by nickname was far too cumbersome, not to mention clients just changing nickname constantly to escape admins, I needed a number that remained constant to be used in admin-commands.
Comments
Edit: this post is dedicated to Locke, a victim of two mis-kickings<!--QuoteEnd--></div><!--QuoteEEnd-->
This is still a prevalent issue....just accidentally kicked TWO people when trying to kick someone else. sv_status, get ID, sv_kick ....oh someone else got kicked. sv_status, get ID, oh someone else got kicked again...
Have an array of Steam-Ids, if a client joins with a Steam-Id not yet in that array, append it to the end. The array-index of the client's Steam-Id will be the client's Overmind-Id (or whatever you will want to call it for this admin-system).
Clear advantages here are:
* The array will be destroyed upon destruction of the Lua-VM (or simply put, a map-change), which means it will usually never grow past 100, so these Overmind-Ids will usually only be 2 digits, making it very easy for admins to type
* The association between the Steam-Id and Overmind-Id persists even after the client has disconnected, so the client can never escape your ban-command (even after disconnecting and rejoining, the client's Overmind-Id will be the same).
Interestingly enough, I put that in to work around the lack of Steam-Ids (in the Lua-scripts) when I first built GameOvermind, as banning by nickname was far too cumbersome, not to mention clients just changing nickname constantly to escape admins, I needed a number that remained constant to be used in admin-commands.