Raised This Month: $48 Target: $400
 12% 

[ANY] Cvar Configs Updater (1.4) [05-May-2018]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Silvers
AlliedModders Donor
Join Date: Aug 2010
Location: SpaceX
Plugin ID:
3053
Plugin Version:
1.4
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    33 
    Plugin Description:
    Back up, delete and update cvar configs, retaining your previous configs values.
    Old 06-30-2012 , 03:50   [ANY] Cvar Configs Updater (1.4) [05-May-2018]
    Reply With Quote #1

    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 (your) 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
    • Herbie
    • id5473
    • The 5th Survivor
    • Patcher



    Admin commands:

    PHP Code:
    sm_configs_backup    // Saves your current .cfg files to a backup folder named \"backup_20240726\" with todays date. Changes map to the current one so plugin cvar configs are created.
    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 "sm_configs|sourcemod|sm_warmode_on"
    sm_configs_ignore ""

    // Cvar Configs Updater plugin version.
    sm_configs_version 


    Changes:
    Code:
    1.4 (05-May-2018)
        - Converted plugin source to the latest syntax utilizing methodmaps. Requires SourceMod 1.8 or newer.
        - Fixed not detecting if backups were already created due to an extra slash at end of directory path.
    
    1.3 (13-Oct-2012)
        - Fixed array index error when lines are empty. Thanks to "disawar1" for reporting.
    
    1.2 (10-Jul-2012)
        - Fixed array index error when reading long lines. Thanks to "Patcher" for reporting.
    
    1.1 (30-Jun-2012)
        - Fixed a small error.
    
    1.0 (30-Jun-2012)
        - Initial release.


    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 - 367 views - 9.9 KB)
    __________________

    Last edited by Silvers; 05-05-2018 at 11:23.
    Silvers is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Lazytown
    Old 06-30-2012 , 04:07   Re: [ANY] Cvar Configs Updater
    Reply With Quote #2

    I've been waiting for this for years. lol, THANK YOU!
    __________________
    I sometimes do commissions.
    Drixevel is offline
    C0nw0nk
    Senior Member
    Join Date: May 2011
    Location: United Kingdom
    Old 07-02-2012 , 08:22   Re: [ANY] Cvar Configs Updater
    Reply With Quote #3

    This is actually highly useful in sourcemod updates and when you have very big configs full of custom cvar's. Also for duplicate cvar's it is good it checks and does not duplicated those that already exists since i do forget what commands i have added and removed.

    Last edited by C0nw0nk; 07-02-2012 at 10:06.
    C0nw0nk is offline
    Send a message via MSN to C0nw0nk
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-09-2012 , 19:27   Re: [ANY] Cvar Configs Updater (1.2) [10-Jul-2012]
    Reply With Quote #4

    1.2 (10-Jul-2012)
    - Fixed array index error when reading long lines. Thanks to "Patcher" for reporting.


    I'm surprised only a few are using this. I've helped several people fix their server when they had too many cvars/configs causing the files to stop being read. Simply by setting sm_configs_comment "1" to comment out the default cvars and updating the configs.
    __________________

    Last edited by Silvers; 07-09-2012 at 19:30.
    Silvers is offline
    dcx2
    Senior Member
    Join Date: Sep 2011
    Old 07-10-2012 , 13:01   Re: [ANY] Cvar Configs Updater (1.2) [10-Jul-2012]
    Reply With Quote #5

    I'm not entirely sure I understand what this is for...

    Does this solve the problem that you have, when you update a plugin that uses the autoexec function of Sourcemod and it has a new cvar, and you need to back up/delete your cfg and let it be created automatically in order to get the new cvars?
    dcx2 is offline
    Silvers
    AlliedModders Donor
    Join Date: Aug 2010
    Location: SpaceX
    Old 07-10-2012 , 13:39   Re: [ANY] Cvar Configs Updater (1.2) [10-Jul-2012]
    Reply With Quote #6

    Quote:
    Originally Posted by dcx2 View Post
    Does this solve the problem that you have, when you update a plugin that uses the autoexec function of Sourcemod and it has a new cvar, and you need to back up/delete your cfg and let it be created automatically in order to get the new cvars?
    Yes, and it sets the cvar values back to what you previously set.
    __________________
    Silvers is offline
    duydangle
    Senior Member
    Join Date: May 2010
    Old 07-10-2012 , 20:44   Re: [ANY] Cvar Configs Updater (1.2) [10-Jul-2012]
    Reply With Quote #7

    Oh my god, you save my ass. This is extremely useful for plugin ugprade, sourcemod upgrade or etc... Thank you so much.
    duydangle is offline
    NeoTM
    AlliedModders Donor
    Join Date: Feb 2013
    Location: Britain
    Old 11-28-2014 , 10:32   Re: [ANY] Cvar Configs Updater (1.3) [13-Oct-2012]
    Reply With Quote #8

    is this plugin work for l4d2?

    I write sm_configs_backup in chat but mothing happen.

    Same when i write sm_configs_compare.

    I see nothing in console and i see nowhere a file named "backup /date/"

    I wanted to try your plugin cos i have lots of cvars i must put in my server.cfg to make them working.

    And sometimes some cvars works one day but not the day after.

    It's really annoying cos i have around 40 plugins to set and some have almost 50 line to set.

    I ask around if someone have this issue to but i start to believe i'm the only one.
    __________________
    NeoTM is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 01:31.


    Powered by vBulletin®
    Copyright ©2000 - 2018, vBulletin Solutions, Inc.
    Theme made by Freecode