Xonotic Forums

Full Version: Running a config script when the server becomes empty?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've got my server setup with different votable gametypes, and it's working well. But one thing I'd like to do is to have the server 'reset' itself to the defaults once it's empty. Is there some mechanism (I'm thinking something like the gametype hooks) which could be used to have the server run a set of commands / execute a configuration file when it starts up a new map empty?
Yes, see my _if_empty alias which is called from sv_hook_gameend. Despite the comment about being experimental, it's worked well for quite a few months. It's inspired by this thread about the console.
Nice, thanks Smile

Now to see if I can find a nice detailed page on prvm_globalget and rpn, those commands look like they could be very useful for a lot of things.
I'm so stealing your _if_empty, martin-t! Thank you!