docker-csgo
docker-csgo copied to clipboard
correctly split up the PUGSETUP_DAMAGEPRINT_CVARS
The previous code would split on spaces causing variables that contained spaces to not be set correctly.
Fixed that code to correctly split the CVARS into the appropriate variables. Also make sure to escape slashes in values to allow sed to properly replace slashes.
Example of CVAR that now works:
PUGSETUP_DAMAGEPRINT_CVARS="sm_pugsetup_damageprint_auto_color=0,sm_pugsetup_damageprint_format= {GREEN}To: [{DMG_TO} / {HITS_TO} hits] From: [{DMG_FROM} / {HITS_FROM} hits] - {NAME} ({HEALTH} hp)"
The above should set /server/csgo/cfg/sourcemod/pugsetup/pugsetup_damageprint.cfg
to
sm_pugsetup_damageprint_auto_color "0"
sm_pugsetup_damageprint_format " {GREEN}To: [{DMG_TO} / {HITS_TO} hits] From: [{DMG_FROM} / {HITS_FROM} hits] - {NAME} ({HEALTH} hp)"
@timche could you test this change before merging it? I've only tested on a separate script when I modified it directly. I didn't test on the actual docker image