PDA

View Full Version : Easiest way to automate changing of sv_password?



Tsukasa1105
4th February 2007, 00:00
On an hourly basis. I'd like to specify what times of a given day the password should be, perhaps with rebooting the server as an option. I'm willing to learn the SDK if that's what it takes, although the initial setup looks annoying.

Paegus
4th February 2007, 00:12
set a cron job (scheduled task in windowsian) to replace a file that server.cfg executes on every map change with another files that sets the password to whatever you want in that time-period or at least the next map loaded after that time period begins.

.../MOD/cfg/server.cfg

...
exec curpass.cfg
...

.../MOD/cfg/sets/6pm.cfg

sv_password "somethingspecial"

.../MOD/cfg/sets/12am.cfg

sv_password ""

.../MOD/cfg/sets/8am.cfg

sv_password "gooooodmorningvietnam!"

then just have the cron job to cp .../MOD/cfg/sets/WHATEVER.cfg .../MOD/cfg/curpass.cfg on cue.