[ANY] Automatic Steam Update
Once the master server notifies the server that there is an update available, and requests a restart, this plugin begins a five minute (default, customizable via cvar) timer, after which the server is restarted (by means of the _restart command). This only works on Linux SRCDS with the -autoupdate parameter added to the command line. The server must actually check for updates each run, or this plugin is pointless. The timer can be cancelled by an admin command, and the plugin will ignore any additional restart requests for a predefined period of time (defined via cvar). The timer itself is displayed in the hint box. It only displays the hint box every minute, until it reaches 60 seconds, upon which the hint box displays a live timer. Upon reaching 30 seconds, the timer is also displayed in csay.
sm_postponeupdate - postpone the update for a predefined period of time (default flag is ADMFLAG_RCON)
auto_steam_update_forceupdate - force the plugin to check for an update, provided Updater is working (console/rcon only)
auto_steam_update_version - plugin version
auto_steam_update_timer - how long the timer lasts until the server is restarted
auto_steam_update_delay - how long the plugin will ignore restart requests after an update is postponed
auto_steam_update_lock - 0 = don't lock the server during the restart timer / 1 = change sv_password during the restart timer / 2 = kick new clients (except admins) during the restart timer
auto_steam_update_password - the string to change sv_password to if auto_steam_update_lock = 1
auto_steam_update_kickmessage - the message to display when kicking clients if auto_steam_update_lock = 2 (defaults to "The server will shut down soon to acquire Steam updates, so no new connections are allowed")
Plugin creates and loads /cfg/sourcemod/plugin.autosteamupdate.cfg
The advantage of using 1 in auto_steam_update_lock is that clients will be denied before attempting to connect. The advantage of using 2 is that the lock will be lifted if the timer is aborted, and admins will be able to bypass it without knowing a password.
Put auto_steam_update.smx into /addons/sourcemod/plugins and reboot your server or type "sm plugins load auto_steam_update" into your console or rcon.
BypassAutoSteamUpdateDisallow - admins with this override will be allowed on the server during the timer if auto_steam_update_lock = 2 (defaults to ADMFLAG_GENERIC)
This plugin requires SteamTools.
Install Updater. The plugin will be autoupdated according to your Updater settings. It'll work without Updater.
- v1.3.0 (11/18/11)
- Timer callback now returns Plugin_Continue instead of Plugin_Handled
- v1.2.0 (11/2/11)
- The plugin now properly checks if the server is populated with actual human players or just bots when a restart is requested
- v1.1.0 (11/2/11)
- Added auto_steam_update_lock and related functionality
- v1.0.0 (10/25/11)
- Initial Release
Download Source (auto_steam_update.sp) (right click > save as...)
Wyświetl pełny artykuł