[ANY] Cvar Configs Updater

Usage:
1. Use the "sm_configs_backup" command.
  • Backs up ".cfg" files from \cfg\sourcemod\ to a folder named \backup_20120726 (whatever is todays date).

  • Ignores (does not edit or backup) your "sm_warmode_off.cfg"; "sm_warmode_on.cfg" and "sourcemod.cfg" configs.

  • Ignores configs you specified with the "sm_configs_ignore" cvar.

  • Changes to the current map so plugins auto make their cvar configs.



2. Use the "sm_configs_compare" command.
  • Checks for matching configs in the backup folder.

  • Opens both files and lists the new and old values of changed cvars.

  • Only shows cvars which exist in both configs, not those which have been added or removed.



3. Use the "sm_configs_update" command.
  • Checks for matching configs in the backup folder.

  • Opens both files and updates the new configs with the old cvar values.

  • Optionally with sm_configs_comment cvar set to "1", cvars which are using the default value will be commented out. (Prevents cvars not being read in at least L4D2 when a server has too many cvars/configs.)

  • Changes to the current map so the game uses the updated cvar values.







Thanks:
  • Don't Fear The Reaper

  • disawar1

  • id5473

  • The 5th Survivor







Admin commands:




PHP Code:







sm_configs_backup    // Sets cvar configs in your cfgs/sourcemod folder values to those from todays backup folder.

sm_configs_compare   // Compares files from todays backup with the current ones in your cfgs/sourcemod folder, and lists the values which have changed.

sm_configs_update    // Sets cvar configs in your cfgs/sourcemod folder values to those from todays backup folder. 













Cvars:



Saved to sm_configs.cfg in your servers \cfg\sourcemod\ folder.




PHP Code:







// Comment out cvars whos values are default.

sm_configs_comment "1"



// Do not move these .cfg files. List their names (without the .cfg extension), separated by the | vertical bar.

// Example: sm_configs_ignore "sourcemod|sm_warmode_on|sm_warmode_off"

sm_configs_ignore ""



// Cvar Configs Updater plugin version.

sm_configs_version 













Installation:
  1. Click "Get Plugin" and put the .smx file into your servers \addons\sourcemod\plugins\ folder.
















Attached Files





File Type: sp


Get Plugin or
Get Source (sm_configs.sp - 9.3 KB)








Orignal From: [ANY] Cvar Configs Updater

No comments

Not a single link is allowed to submit in comment :o