The writecfg command has restrictions on writing configs that can be automatically executed when client or server starts. Their list includes:
config.cfg
autoexec.cfg
listenserver.cfg
server.cfg
userconfig.cfg
] writecfg config
skipping writecfg output, invalid filename given
] writecfg /config
/config.cfg successfully created!
language.cfg, since game client tries to execute this config at startup as well.HL1 also tries to execute violence.cfg on startup. It may still be worthwhile to add substring hw/ to list of blocked ones, so that configs for video cards that are on valve/hw/ path cannot be overwritten.
And also valve \ valve.rc
And also valve \ valve.rc
writecfg can only write files with .cfg extension, so valve.rc cannot be overwritten.
Once, after connecting with one unreliable REHLDS server, a line appeared in this file:
connect ip: port
Perhaps not these, but by some other workaround, it was rewritten from the server side. Therefore, it is also a good idea to fix it here. It also modifies or creates the file "joystick.cfg", which is also readable if available.
Fixed, this will be included in the next beta update.
game.cfg
joystick.cfg
I think this list should also include banned.cfg, which uses cvar bannedcfgfile by default and listip.cfg, where writeip command writes data. HL1 also executes skill.cfg in a singleplayer game.
I will summarize resulting list:
language.cfg
violence.cfg
hw/
joystick.cfg
game.cfg
banned.cfg
listip.cfg
skill.cfg
Thanks @Splatt581.
The list that will be blocked from writecfg is:
I confirm, fixed in 8254 build.
Most helpful comment
Thanks @Splatt581.
The list that will be blocked from writecfg is: