UNVERIFIED SPAWN REVOKE script
Posted: Sun Jan 01, 2006 10:40 pm
If you've been to silvercat lately, you may or may not have noticed a admsg stating that the server will kick unregistered players to make room for registered players. You may be wondering how we do that. Well, in the interest in encouraging players to register (the goal is to go register-only to discourage cheaters and such), I'll share the script we use.
This script runs as a cronjob to check if there are more than x players, and if so remove SPAWN priveledges for y minutes.
Take a look at the script here: http://bzflag.pastebin.ca/35460
The way this is done, is we have a groupdb "standard" which has normal priveledges, and another that is named "regonly" which has -SPAWN for EVERYONE and +SPAWN for VERIFIED. When the script runs, it checks to see how many players there is (the preferred way to do this is to look at bzfquery output) and creates a symlink from either "standard" or "regonly" to the file your server is using for groupdb. Next, bzadmin logs in (as a user in your admin group) and runs /reload which causes the new groupdb file to take effect.
We run the script every 15 minutes. The defaults are to revoke priveledges for 60 seconds if there are more than 10 players.
As an added "feature" bzadmin outputs to a file which can be parsed by bzstats or some other stat generating program.
If you have questions, post them here, since I don't really want to answer the same question twice.
I'd really like to know if anyone else uses this. Thanks,
Silver Fox
This script runs as a cronjob to check if there are more than x players, and if so remove SPAWN priveledges for y minutes.
Take a look at the script here: http://bzflag.pastebin.ca/35460
The way this is done, is we have a groupdb "standard" which has normal priveledges, and another that is named "regonly" which has -SPAWN for EVERYONE and +SPAWN for VERIFIED. When the script runs, it checks to see how many players there is (the preferred way to do this is to look at bzfquery output) and creates a symlink from either "standard" or "regonly" to the file your server is using for groupdb. Next, bzadmin logs in (as a user in your admin group) and runs /reload which causes the new groupdb file to take effect.
We run the script every 15 minutes. The defaults are to revoke priveledges for 60 seconds if there are more than 10 players.
As an added "feature" bzadmin outputs to a file which can be parsed by bzstats or some other stat generating program.
If you have questions, post them here, since I don't really want to answer the same question twice.
I'd really like to know if anyone else uses this. Thanks,
Silver Fox