The International Simutrans Forum

Community => Simutrans Help Center => Topic started by: jamespetts on December 29, 2012, 01:01:04 PM

Title: Probably silly question about resetting players on a server
Post by: jamespetts on December 29, 2012, 01:01:04 PM
I haven't changed the code for administering players/setting passwords from Standard to Experimental, so, unless I have unwittingly introduced a bug, the answer ought be the same for both: has the means of the public player/server administrator resetting players in an online game changed in the last 18 months? I used to be able to reset by, when logged in as the public player, clicking on another player's red button and pressing "return" in the blank password field: this would reset the player's password to a blank state so that other people can take over that player.

This does not appear to work in the version of Experimental that is based on version 111.2.1 of Simutrans. Is there something that I am missing, or do I need to be searching for an Experimental specific bug...?
Title: Re: Probably silly question about resetting players on a server
Post by: Dwachs on December 29, 2012, 01:25:22 PM
This does not work anymore. I think it was changed, when server-side authentication of players was introduced (r5186).
.
As workaround, you can use nettool with unlock-command.

To enable this missing functionality again you can modify nwc_auth_player_t::execute to somehting like this:

if (info.is_player_unlocked(player_nr)  ||  info.is_player_unlocked(1)  ||  info.state == socket_info_t::admin) {

(I did not test it)

Should this be implemented in standard as well? Any opinions? As there were no complaints up to now, it seems this functionality was not used much.
Title: Re: Probably silly question about resetting players on a server
Post by: jamespetts on December 29, 2012, 01:26:48 PM
Thank you - that is helpful. When was the unlock command introduced in nettool, do you know?
Title: Re: Probably silly question about resetting players on a server
Post by: Dwachs on December 29, 2012, 01:36:03 PM
r6159
Title: Re: Probably silly question about resetting players on a server
Post by: jamespetts on December 29, 2012, 02:09:58 PM
Hmm, the current Experimental builds are based on r5434 (111.2.1) and do not have this feature. I shall have to wait until the work on merging up to 112.0 is complete, I think.

Thank you for the information!
Title: Re: Probably silly question about resetting players on a server
Post by: jamespetts on December 29, 2012, 05:11:34 PM
Incidentally, may I ask: was there a particular reason that the in-game unlocking by the public player was removed?
Title: Re: Probably silly question about resetting players on a server
Post by: prissi on December 29, 2012, 09:52:46 PM
In the nightly test game I tried what james was suggested and it seemed to have worked. I.e. being unlocked public player and then setting/resetting passwords of other players. (Although I got the desyncs for the other bug then, but still the PW seemed correct.) I would also I think this is much easier for an administrator compared to the use of another tool.