Config Reload Command 1.0.0 (olds.ro)
=====================================
Lets an admin run server.cfg, or another config file in the game folder,
again without restarting the server or changing the map. The new settings
are live as soon as the command finishes, and the admin is told so.
Requirements
- AMX Mod X 1.10 or newer (no extra modules, ReAPI is not needed)
- Tested on AMX Mod X 1.10.0.5490, ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814
Install
1. Compile scripting/olds_execcfg.sma with amxxpc 1.10 and copy
olds_execcfg.amxx to addons/amxmodx/plugins/.
2. Copy data/lang/olds_execcfg.txt to addons/amxmodx/data/lang/.
3. Copy configs/plugins/olds_execcfg.cfg to addons/amxmodx/configs/plugins/
(if you skip this, the plugin writes the same file with the default on
its first start).
4. Add olds_execcfg.amxx to addons/amxmodx/configs/plugins.ini.
Command (admins with the ADMIN_RCON flag "l", and the server console)
amx_execcfg runs server.cfg again
amx_execcfg practice.cfg runs practice.cfg from the game folder (cstrike/)
- Only plain file names are accepted: lower-case letters a-z, digits 0-9
and _ followed by .cfg, at most 63 characters. Paths such as ../secret,
other extensions and capital letters are refused, so the command can only
run config files in the game folder.
- If the file does not exist, the admin is told and nothing is executed:
every setting stays as it was.
- Admins without the flag get "You have no access to amx_execcfg."
- A config started by amx_execcfg cannot call amx_execcfg again (that line
is skipped with a message), so a config that names itself cannot loop.
Use the normal exec command inside configs instead.
- The access flag can be changed in addons/amxmodx/configs/cmdaccess.ini.
Settings (addons/amxmodx/configs/plugins/olds_execcfg.cfg)
olds_execcfg_log 1 1 = write each run to the AMX Mod X log, 0 = do not log
Log line example (addons/amxmodx/logs/L<date>.log)
Cmd: "Admin<3><STEAM_0:1:123><>" executed config "server.cfg"
No sounds, models or sprites are used.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card LIB-1502.
Licence: GNU GPL version 3 or later (GPL-3.0-or-later).