This plugin was requested on the forum by Billiam. It gives any server running a source mod (CS:S, TF2, L4D, many more) the ability to load daily config files. That is to say: monday.cfg will be loaded at every mapchange on monday, tuesday.cfg on tuesday, etc.

Supported games

The game should work on nearly every game using the source or orangebox engine, which would include:

Team Fortress 2

Counter-strike : Source

Day of Defeat : Source

Left 4 Dead

Insurgency

Garry's Mod

Commands and CVars:

sm_dailyconfig_offset - Time difference to apply to the server clock when determining today's config.

sm_dailyconfig_clock - This command allows you to see the current time on the server both with and without sm_dailyconfig_offset applied.

Change the map on your server (or restart it) to force the plugin to load.

Empty configfiles for each day will automaticly be created (if possible and if they didn't already exist)

Usage:

The plugin will attempt to load one of the following files from the cfg/dailyconfig/ directory:

monday.cfg

tuesday.cfg

wednesday.cfg

thursday.cfg

friday.cfg

saturday.cfg

sunday.cfg

If the configfile for the current day is not available, no additional configfiles will be loaded. The serverconsole will notify the administrator by the following line:

exec: couldn't exec saturday.cfg

No additional errors, warnings or logentries are created.

Notes:

The daily configfile is loaded on every mapchange, similar to the server.cfg file.

The daily configfile is loaded after the game is done loading the usual configfiles (such as server.cfg). Because of this, any setting you put in the dailyconfig, will overrule the settings preset in server.cfg

The daily config plugin uses the date and time of your server, so make sure the time is set correctly. If you wanna use another timezone than the server machine itself, change sm_dailyconfig_offset to "-2" or "+4" or similar values. Use sm_dailyconfig_clock to see/test your settings

The sm_dailyconfig_offset cvar is relative to the server time, not relative to GMT. sm_dailyconfig_offset "+1" means the time will be seen as servertime+1hour , not GMT+1.

Possible features to be added in future versions:

Adding a cvar sm_dailyconfig_enable <0/1> to effectively enable/disable the plugin (only if people should want this)

Adding cvars holding the filenames of the configfiles to be loaded, eg: sm_dailyconfig_saturday "saturday.cfg" (only if people should want this)

Version history

Version 1.2

Added: The sm_dailyconfig_offset cvar to effectively allow you to change the timezone.

Added: The sm_dailyconfig_clock command to debug/test the timezone offset.

Changed: webcompiler to sourcemod version 1.2

Version 1.1

Added: Automatic creation of configfiles

Changed: the daily config files are now inside a separate directory within the cfg directory.

The plugin was a request, the crontab plugin can indeed do anything this plugin does (and much much more).

Consider this the lean and mean version for people who just want straight up daily config files without having to deal with a plugin that has multiple configuration files and features/terms many people aren't familiar with.

If you want more freedom and options, go for the excellent Server crontab plugin. If all you need is a monday.cfg this might be the simpler choice.

Dude! this is a good idea! you could have themed nights; program the day.cfg with a new hostname and enable/disable plugins. so you could set it up like 'Monday - low gravity, Tuesday - custom maps, etc.