Enable the server to request the client to reconnect. This can be done with the now extended minetest.request_shutdown([reason], [reconnect]) setting.
Also, clean up surrounding code style Replace by-value parameter passing with const refs when possible Fix post-increment of iterators