News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Probably silly question about resetting players on a server

Started by jamespetts, December 29, 2012, 01:01:04 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

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...?

Dwachs

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.

jamespetts

Thank you - that is helpful. When was the unlock command introduced in nettool, do you know?

Dwachs


jamespetts

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!

jamespetts

Incidentally, may I ask: was there a particular reason that the in-game unlocking by the public player was removed?

prissi

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.