Chapter 7. Database System

As of Jaymod 2.1.0 a new text-based database file structure has been created. Replacing the old data files are new .db files. These files, when possible, store information in human-readable ASCII format.

[Important]Important
All .db files are loaded into memory at game-init (map begin) time, and subsequently saved out to disk (overwriting the files) at game-shutdown (map end) time. This means any manual edits made to the database files will be lost at game-shutdown time. The best practice for manual edits (eg: adding levels to level.db file) is to first shutdown the server before editing database files.

The following table describes the new locations for old data.

Table 7.1. Data Transition

pre-2.1.02.1.0DATA DESCRIPTION
shrubbot.cfglevel.dbaccess levels
shrubbot.cfguser.dbadmin and bans
xpbackup.datuser.dbsaved xp
recspree.datmap.dbtop killing sprees
seendb.datuser.dbadmin and bans

level.db

Stores access levels available for promoting users to higher levels of access. Data maintenance on this file is done manually with a text editor. ET color codes are supported. The following sample shows a default level=0 record and a manually edited level=1 record with full access.

Figure 7.1. level.db Sample

level = 0
flags = ACXahiu
name = default
greetingtext = 
greetingaudio = 

level = 1
flags = *
name = ^3god
greetingtext = 
greetingaudio = 

user.db

Stores user related information. Most data maintenance on this file can be done in-game, however some things such as greetingtext must manually be edited. You cannot edit xpSkills. The following sample shows a typical user with authLevel=0 which corresponds to the level=0 record in level.db.

Figure 7.2. user.db Sample

guid = 9b830ff2b957a1c6bf28fce9e7a765e9
timestamp = 1168172721 # Sun Jan  7 07:25:21 2007
ip = 127.0.0.1
mac = f4:e5:d6:cc:b8:a9
name = Mr.Mxyzptlk
namex = ^oMr.^xMxyzptlk
authLevel = 0
authFlags = 
greetingtext = 
greetingaudio = 
xpSkills = UyHf9+YAoWDqH5c+RsnNn/7eaxFnn3lKPgyLHdOsgjs=

Table 7.2. Command Authorization Flags

COMMANDFLAGDESCRIPTION
aboutAshow basic information about Jaymod
admintestashow current admin level
banbban a user by GUID or IP
baninfoBshow detailed ban information
cancelvoteccancel active vote
crazygravityMrandomize gravity settings every 30 seconds
crybabyytaunt a whining player
disorientdinvert a players view and controls
fingerI (uppercase-i)show information about a player
flingl (lowercase-L)throw a player in a random upward direction
flingaLthrow all players in a random upward direction
ftimegshow the current Central Time in a fun way
glowztoggle colored halo effect for all players
helphshow all authorized commands or detailed help for specific command
kickkkick a player off the server
launchl (lowercase-L)launch a player straight up
launchaLlaunch all players straight up
listlevelsishow all admin levels
listplayersishow all players names, player-slot numbers and admin levels.
lockKlock a team so players cannot join it
lolxrain grenades from the sky
lsplayersishow all player names with extended information
mutemdisable voice, chat and admin commands for a specific player
newsWplay standard mission radio message included with stock maps and some custom maps
nextmapnload next map in rotation
orientdrestore standard view and controls for a specific player
pantszstrip the pants from a specific player
panzerwarMenable panzer-war mode
pauseZpause the game
pipzdraw stars/glitter-effects around all players heads
popzknock off helmets from all players
putteampplace a specific player on a specific team
readconfigGreload/remerge server database files into RAM
renameNchange the name of a specific player
resetrrestart a map and also reset XP to what it was when the match began
resetmyxpXreset your own XP to zero
resetxpRreset the XP of a specific player to zero
restartrrestart a map and keep XP gained since the match began
revivevrevive yourself or a specific player
seenEshow the last time a specific player was seen on the server
setlevelschange the admin level for a specific player
shakeHshake a specific player's screen
showbansBshow the current list of banned players
shuffleSmix teams up so they are more fair
slapl (lowercase-L)punish a naughty player
smiteUburn a naughty player
sniperwarMenable sniper war
speceinstantly spectate a specific player
spec999Pplace all players with 999 ping into spectator mode
splatl (lowercase-L)crush a specific player into oblivion
splataLcrush all players into oblivion
status_ (underscore)show various bits of internal information relating to server resources and operation
swapwplace all players on opposite teams
throwl (lowercase-L)throw a specific player straight ahead
throwaLthrow all players straight ahead
timeCshow the current server local time
unbanblift a previously banned player
unlockKunlock a team so players can join it again
unmutemenable voice, chat and admin commands for a specific player
unpausezunpause the game
uptimeushow the elapsed time since server came online

Table 7.3. Abilities Authorization Flags

FLAGDESCRIPTION
1cannot be kicked, vote-muted, dropped for inactivity or complained against
2cannot be censored or flood protected
3can run commands silently from console (/!command)
4can see all team, fireteam and PM chat as spectator
5can switch to any team regardless of balance
6does not need to specify a reason for kick/ban
7can call a vote anytime (even if disabled)
8does not need to specify the duration of a ban (permanent ban)
9can run commands from team or fireteam chat