fix server hanging after 5th demo
fix incomplete demo slot cleanup
fix demo file size reporting (enddemorecord can't do it accurately, because
the file is not complete, yet - so, round to megabytes, where the error
doesn't show...)
include exact demo file size in "listdemos" report
If a filename does not contain at least mode, map and timestamp (due to
messed up format strings), the default format is used to ensure unique
filenames.
server side: added server parameters
demo_max_number
number of demo files to hold in RAM
demo_save
enable/disable writing of demos to file
demo_path
demo file path and filename prefix
demo_filenameformat
format string to assemble demo information to a filename
%g : gamemode (int)
%G : gamemode (chr)
%F : gamemode (full)
%m : minutes remaining
%M : minutes played
%s : seconds remaining
%S : seconds played
%h : IP of server
%H : hostname of server (client only)
%n : mapName
%w : timestamp (formatted by demo_timestampformat)
demo_timestampformat
timestamp format string (see strftime() for format options)
if the string starts with 'U', UTC is used - otherwise local time
client side:
changed demonameformat and demotimeformat to SVARs
demonameformat
like demo_filenameformat
demotimeformat
like demo_timestampformat
removed demotimelocal getdemonameformat getdemotimeformat getdemotimelocal
DOCREF demonameformat demotimeformat
DOCREF demotimelocal getdemonameformat getdemotimeformat getdemotimelocal
a negative modepenalty_weight value makes the server more likely to
suggest games with the same mode as was recently played
default is a positive value to more likely mix it up
mapartist print|set|get|clear
print: prints the map artist player ID
set: sets the map artist player ID to the currently logged in player
get: returns the current map artist player ID
clear: erases an existing map artist record in the current map
modeinfo list|get|clear|<modelist> <modeflags>
list: lists current modeinfo entries
get: returns list of current modeinfo entries
clear: erases current list of modeinfo entries
<modelist> <modeflags>: specifies flags for a list of modes
DOCREF modeinfo mapartist
The server keeps track of every player ID that ever connected successfully.
This database stores the last names and IPs used by the player and the
last countries the connections came from. Some stats are counted, like
"time connected" and "total tks". Most importantly, the database stores
rights (like admin) and restrictions (like ban). All rights and
restrictions are kept as dates (or timecodes), so, for example, if your
ban date is in the future, you are banned - and if it's in the past, you
can play. The collected stats are meant to help server owners at managing
players - especially, if they want to give someone admin rights.
The database is periodically saved to a file and read from that file on
startup. The default file is config/servervita.cfg and one backup is kept
in config/servervita_bak.cfg. During server start, if the regular file
can't be loaded, the backup is tried instead.
While the server is running, it checks periodically for a file named
config/servervita_update.cfg, and if the file exists, it is renamed to
a backup filename including a timecode and read and merged into the
database. The automatic rename makes sure, that a file is only read once.
Using such updates, a server owner can easily give several people admin
rights or for example, add clan tags for a whole list of IDs. (Yes, the
database also stores a clan tag for every ID...)
The database also stores two short comments for every ID. One can only be
read by server admins, but the other one is public. The public reason, for
example, can state a reason for a ban.
One database record takes up 264 bytes of RAM. During autosave, accounts,
that have not been used for a specified time (default 12 months), will
not be written. After a server restart, those old records will be gone.
Currently, there is no process in place, to also clean up old records
from RAM. Maybe, that'll be added later...
Instead of a list of specific map+mode combinations the maprot now only
contains general rules for maps and game modes. The server then calculates
the list by itself when needed. The server accounts played maps and modes
(and map+mode combinations) and calculates the list specifically not to
overplay maps or modes.
May need further testing.
A list of parameters is read from config/serverparameters.cfg once per
minute and the values written to corresponding server data structures.
If the binary is compiled in debug mode, starting a dedicated server
will write a blank config file with all possible parameters and their
descriptions, sorted and grouped into chapters.
The name of the config file can be set with the commandline parameter -A.
So far, syntax errors are not reported. Instead, it's possible to dump
all current values to a file every time something changes.