ask_reconnect_on_crash

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

ask_reconnect_on_crash

by orwell » Fri Mar 11, 2016 14:57

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.
Last edited by orwell on Tue Mar 15, 2016 11:45, edited 1 time in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: ask_reconnect_on_crash

by orwell » Fri Mar 11, 2016 18:11

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...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

est31
Member
 
Posts: 172
Joined: Mon Dec 29, 2014 01:49

Re: ask_reconnect_on_crash

by est31 » Sat Mar 12, 2016 00:20

In fact, minetest.request_shutdown is already supposed to work that way you describe it. Most likely its fixed now thanks to your patch!
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: ask_reconnect_on_crash

by orwell » Mon Mar 14, 2016 18:20

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!
Last edited by orwell on Tue Mar 15, 2016 11:41, edited 1 time in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: ask_reconnect_on_crash

by orwell » Tue Mar 15, 2016 11:38

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...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 32 guests

cron