Auto -re-/set defaults on first player join
-
- Private First Class
- Posts: 13
- Joined: Fri Jul 03, 2009 1:30 pm
Auto -re-/set defaults on first player join
I arrived at a map earlier where players and admin were trying to fix some server variables that appear to have been adjusted earlier through a poll.
It occurred to me that when a first player joins (or last player leaves) a map, the server could automatically set all variables back to their defaults. Any poll changes then only persist as long as players are active on the map and do not remain for later players. Self fixing!
It occurred to me that when a first player joins (or last player leaves) a map, the server could automatically set all variables back to their defaults. Any poll changes then only persist as long as players are active on the map and do not remain for later players. Self fixing!
- The Noah
- Private First Class
- Posts: 82
- Joined: Mon Jul 11, 2016 9:38 pm
- Location: United States
- Contact:
Re: Auto -re-/set defaults on first player join
I agree. Although I think /poll set should just be removed or defaulted to not being allowed.
I've been working on a real-time stats site called BZList, please check it out! It is still in active development, so some features are missing and watch out for bugs.
GitHub · Website · Get in touch · Stalk Me
GitHub · Website · Get in touch · Stalk Me
Re: Auto -re-/set defaults on first player join
I believe someone has actually written a script that did just that; reset all server variables once no players were on the map. It was either that or restarting the entire server with the default values. Uncertain.
Re: Auto -re-/set defaults on first player join
serverControl allows you to reset the server by it shutting down and letting a bash script restart it; look at the `ResetServerOnce*` settings. Without restarting the server, a simple plug-in (or PR to serverControl) could be added to just make a call to bz_resetALLBZDBVars.
Re: Auto -re-/set defaults on first player join
It would probably be the ResetServerAlwaysFile actually, since that would restart the server every time it emptied. ResetServerOnceFile is more when you want to restart a server for maintenance (such as upgrading to a new bzfs binary) after it has emptied.
-
- Private First Class
- Posts: 13
- Joined: Fri Jul 03, 2009 1:30 pm
Re: Auto -re-/set defaults on first player join
Many thx for the pointers. I've just suggested it to one owner where a problem occurred recently.
/poll set can be fun & educational sometimes, but yes, should probably be concsiously enabled by an owner.
/poll set can be fun & educational sometimes, but yes, should probably be concsiously enabled by an owner.
- Zehra
- Private First Class
- Posts: 921
- Joined: Sun Oct 18, 2015 3:36 pm
- Location: Within the BZFS API and Beyond it
- Contact:
Re: Auto -re-/set defaults on first player join
In versions 2.4.12 and upwards, poll set is not enabled by default.
Code: Select all
BZFlag 2.4.12 "Silence is Golden" (2017-10-29)
-----------------------------------------------
* Allow API to trigger CTF capture event - Vladimir Jimenez
* Allow setting default values for BZDB from API - Vladimir Jimenez
* Add bzu_getTeamFromFlag() convenience function - Vladimir Jimenez
* Add new functions to the bz_APIStringList - Vladimir Jimenez
* Add string utility functions to the API and TextUtils - Vladimir Jimenez
* Fixed an issue with ASCII characters from modified non-ASCII keys in SDL 2
- Joshua Bodine
* Fixed compilation on macOS when using autotools/gcc - Mike Miller
* Don't send client queries on behalf of players - Vladimir Jimenez
* Removed pollSet as a default perm in bzfs - Vladimir Jimenez
* Player records canSpawn value no longer always returns true - Vladimir Jimenez
* bz_addURLJob() now supports setting HTTP headers - Vladimir Jimenez
* Made multisampling work on all platforms with SDL 1.2/2 - Joshua Bodine
* Add bz_eMuteEvent and bz_eUnmuteEvent to the API - Vladimir Jimenez
* Add configure --disable-server option - Jeff Makey
* Add bz_isPlayerAutoPilot() to the API - Vladimir Jimenez
* Add bz_eAutoPilotEvent to the API - Vladimir Jimenez
* Add bz_getServerOwner() API function - Vladimir Jimenez
* The _maxFlagGrabs BZDB setting is no longer a random number - Vladimir Jimenez
* Add API access for the handicap system - Jeff Myers, Vladimir Jimenez
* Remove Xcode references to deployment targets except for main project
- Joshua Bodine
* Allow silencing unregistered players in the client - Scott Wichser
* Fix the /silence and /unsilence client commands - Scott Wichser
Are you sure this would do as expected?allejo wrote: ↑Tue Aug 27, 2019 4:52 am serverControl allows you to reset the server by it shutting down and letting a bash script restart it; look at the `ResetServerOnce*` settings. Without restarting the server, a simple plug-in (or PR to serverControl) could be added to just make a call to bz_resetALLBZDBVars.
Judging by the function name, it seems that it would simply reset all variables to the "defaults", instead of the values which may have been passed.(Not what is wanted in this case.)
It is not too difficult to write a plug-in which does perform a reset when the player count reaches zero.
So I may do so myself in the future. Or offer help to anyone who does wish to do so.
-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra
See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.
Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra
See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.
Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Re: Auto -re-/set defaults on first player join
Unless I'm mistaken, I'm pretty sure that BZDB values set at startup are set to be the default value. So a '/reset *', for instance, will reset all settings back to what the server config or world had defined.
Re: Auto -re-/set defaults on first player join
The reset will work in cases like this. The incident that started this thread was taken care of by disabling the polls on the server in question to avoid further problems. The bash script for the restart will also work as that is how I have my servers set up... Unfortunately it looks like poll abuse is still a thing, but it only gives temporary satisfaction to those who do abuse it. The tools that are available in BZFS and Linux are more than adequate to take care of these things. That being said, the problem has been solved on the server so go and enjoy the game.
- Zehra
- Private First Class
- Posts: 921
- Joined: Sun Oct 18, 2015 3:36 pm
- Location: Within the BZFS API and Beyond it
- Contact:
Re: Auto -re-/set defaults on first player join
Server owners should already be aware of the permissions from global groups and how to configure them, especially the defaults.
Three simple signs (!, +, -) can be used to deny, grant and omit permissions from various global groups.
Additionally, poll "set" abuse need not be a concern for server owners who have updated to 2.4.12 and above as by default, the pollSet permission is not granted.
For those who may need assistance in setting up permission files for global groups, feel free to private message me.
-Zehra
Three simple signs (!, +, -) can be used to deny, grant and omit permissions from various global groups.
Additionally, poll "set" abuse need not be a concern for server owners who have updated to 2.4.12 and above as by default, the pollSet permission is not granted.
For those who may need assistance in setting up permission files for global groups, feel free to private message me.
-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra
See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.
Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra
See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.
Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
Re: Auto -re-/set defaults on first player join
Actual server owners work together pretty well in this game. The collective experience and Linux knowledge among us is pretty good. That's how these sort of problems get resolved pretty quickly. As stated before, the problem has been taken care of.