The console's exec and cfg_save, as FTE's Cmd_Exec_f and Cmd_WriteConfig_f
run them, with FTE's main config fte.cfg.
exec name reads name, or name.cfg when there is no name, from the table's home
directory (QuakeServer.Cvars.home/1) first and then the game's files; a name
starting ../ or ./ is refused. Its commands run before the rest of what was being
run, and:
exec config.cfg(orq3config.cfg) runsexec fte.cfgafter it, and is refused whendefault.cfgis found earlier in the search order than it (depth/2);exec fte.cfgis refused the same way- after
config.cfg,q3config.cfgorfte.cfg,exec default.cfgruns whendefault.cfgis found earlier than it; avid_restartline in them is made a comment - after
default.cfg,cvar_lockdefaults 1runs (not for one the server execs), so its values become the defaults - a UTF-8 byte order mark is skipped
execing name is printed while cl_warncmd or developer is set; couldn't exec name when there is no such file.
cfg_save [name] writes the key bindings (QuakeServer.Console.Bindings.write/1,
while cfg_save_binds is set), the console aliases and the archived variables
(QuakeServer.Cvars.archive_text/2; every variable while cfg_save_all is set) to
fte.cfg in the home directory, or to configs/name.cfg, under a // FTE config file (date) line, and marks them saved; cfg_save_ifmodified does so only when an
archived variable changed.
Summary
Functions
Where file name is in the search order: -1 in the home directory, otherwise the
game source's depth/1 (0 for any file when the source has none); 0x7FFFFFFF when
there is no such file.
Run exec with its words, from the console (:local) or the server; the server and
the commands to run before the rest.
Run cfg_save or cfg_save_ifmodified (command) with its words.
Functions
@spec depth(QuakeServer.Server.t(), String.t()) :: integer()
Where file name is in the search order: -1 in the home directory, otherwise the
game source's depth/1 (0 for any file when the source has none); 0x7FFFFFFF when
there is no such file.
@spec exec(QuakeServer.Server.t(), [String.t()], :local | :server) :: {QuakeServer.Server.t(), [String.t()]}
Run exec with its words, from the console (:local) or the server; the server and
the commands to run before the rest.
@spec save(QuakeServer.Server.t(), String.t(), [String.t()]) :: QuakeServer.Server.t()
Run cfg_save or cfg_save_ifmodified (command) with its words.