Page 1 of 1

ask_reconnect_on_crash

PostPosted: Fri Mar 11, 2016 14:57
by orwell
minetest.conf.example wrote:#ask_reconnect_on_crash = false
# Whether to ask clients to reconnect after a (lua) crash.
# Set this to true if your server is set up to restart automatically.

Maybe a silly question, but has anybody implemented this yet? In stable 0.4.13, this option does not seem to work.

EDIT this has been done too...
If so, maybe we could extend it:
minetest.request_shutdown(reason_to_kick_clients, ask_reconnect)
to allow mods or server admins to use this feature

Or even:
minetest.kick_player_ask_connect(player, address, port, message)
to abuse this feature to tell the client to connect to another server.

Re: ask_reconnect_on_crash

PostPosted: Fri Mar 11, 2016 18:11
by orwell
I checked the source code.
It IS implemented and works very well. Someone just forgot to add the new parameter to the function call of SendAccessDenied() (on server side, so clients are not affected). I made a pull request.

But the ideas remain. Maybe I get the first one done on my own...

Re: ask_reconnect_on_crash

PostPosted: Sat Mar 12, 2016 00:20
by est31
In fact, minetest.request_shutdown is already supposed to work that way you describe it. Most likely its fixed now thanks to your patch!

Re: ask_reconnect_on_crash

PostPosted: Mon Mar 14, 2016 18:20
by orwell
Pah, its not fixed...
For some reason the password is cleared from the MainMenuData object somewhere in the process, so when reconnecting, it won't send the password and the client will be rejected because of wrong password...
As of now, I didn't find the source of this.
EDIT see next post!

Re: ask_reconnect_on_crash

PostPosted: Tue Mar 15, 2016 11:38
by orwell
Found!
Made a pull request.
Edit: Immediately after posting this I saw that est31 did the same 4 hours ago :)

I am happy to see that it works now...