-
Notifications
You must be signed in to change notification settings - Fork 3
/
TABLES
120 lines (108 loc) · 7 KB
/
TABLES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
===============================================================================
SLDB tables
===============================================================================
SLDB currently uses following tables, which can be divided in 8 categories (check "createTablesIfNeeded" function from Sldb.pm file for more detailed information):
Main lobby tables: (filled by slMonitor by monitoring Spring lobby)
=================
accounts: id, rank, admin, bot, lastUpdate
names: accountId, name, lastConnection
countries: accountId, country, lastConnection
hardwareIds: accountId, hardwareId, lastConnection
systemIds: accountId, systemId, lastConnection
games: hostAccountId, startTimestamp, endTimestamp, endCause, hostName, modName, mapName, nbSpec, nbPlayer, description, passworded, engineName, engineVersion, gameId
players: hostAccountId, startTimestamp, accountId, name
Games details tables: (filled by slMonitor from GDR data sent by SPADS, and by zkMonitor from Zero-K website)
====================
gamesDetails: gameId, gdrTimestamp, startTimestamp, endTimestamp, duration, engine, type, structure, bots, undecided, cheating
playersDetails: gameId, accountId, name, ip, team, allyTeam, win
botsDetails: gameId, name, ownerAccountId, ai, team, allyTeam, win
Accounts details tables: (filled by slMonitor, and updated automatically by slMonitor or manually by sldbLi for smurf management)
=======================
userAccounts: accountId, userId, nbIps, noSmurf
userDetails: userId, name, clanTag, email, forumId, nbIps
ips: accountId, ip, lastSeen
userIps: userId, ip, lastSeen
ipRanges: accountId, ip1, ip2, lastSeen
userIpRanges: userId, ip1, ip2, lastSeen
smurfs: id1, id2, status, orig
(status values: 0: not-smurf, 1: sticky-smurf, 2: probable-smurf)
(orig: 0: auto, <nb>: admin accountId)
Parameterization table: (filled manually by SLDB admin)
======================
gamesNames: name, shortName, regex, testRegex, chickenRegex
Rating tables: (filled/updated by ratingEngine, but tsRatingQueue and rerateRequests are also filled by slMonitor, zkMonitor and sldbLi to queue (re)rate operations; tsStartSkills is filled by sldbLi)
=============
ts{Duel|Ffa|Team|TeamFFa|""}Games: gameId, accountId, userId, modShortName, gdrTimestamp, muBefore, sigmaBefore, muAfter, sigmaAfter
ts{Duel|Ffa|Team|TeamFfa|""}Players: period, userId, modShortName, skill, mu, sigma, nbPenalties
tsRatingState: param, value
(param values: "currentRatingYear", "currentRatingMonth", "batchRatingStatus")
tsRatingQueue: gameId, gdrTimestamp, status
(status values: 0: queued, 1: in progress, 2: duplicate, 3: error/unratable, 4: error/gdrTimestampFormat, 5: error/inconsistentGdrTimestamp, 6: undecided game, 7: cheating game)
rerateRequests: type, id, startPeriod, status, requestTimestamp
pendingRerates: modShortName, startPeriod, requestTimestamp
tsStartSkills: accountId, modShortName, startSkill
Preference tables: (filled/updated by sldbLi and xmlRpc)
=================
prefAccounts: accountId, prefName, prefValue
prefUsers: userId, prefName, prefValue
Real time tables: (filled/updated in real time by slMonitor to mirror current lobby server state)
================
rtBattles: battleId, founderId, founder, ip, port, type, natType, locked, passworded, rankLimit, modName, mapName, mapHash, description, maxPlayers, nbSpec, engineName, engineVersion
rtPlayers: accountId, name, access, bot, country, lobbyClient, rank, inGame, gameTimestamp, away, awayTimestamp
rtBattlePlayers: accountId, battleId
Event logging tables: (admin events can be generated by all SLDB components, see "Admin events" section below)
====================
adminEvents: eventId, date, type, subType, orig, origId, message
(type values: 0: UPD_USERDETAILS, 1: JOIN_ACC, 2: SPLIT_ACC, 3: ADD_PROB_SMURF, 4: DEL_PROB_SMURF, 5: ADD_NOT_SMURF, 6: DEL_NOT_SMURF)
(orig values: 0: auto, 1: admin, 2: concerned user himself)
(origId: accountId if applicable)
adminEventsParams: eventId, paramName, paramValue
===============================================================================
Admin events
===============================================================================
UPD_USERDETAILS(0) (update of userDetails)
event params: updatedUserId, updatedParam, oldValue, newValue
JOIN_ACC(1) (join of 2 users)
(orig:0 => shared ip)
(subType:0 => conflict with "not-smurf" entries which thus have been removed from smurfs table
subType:1 => no update of smurfs table
subType:2 => consistent with "probable-smurf" entries which thus have been removed from smurfs table)
event params: mainUserId, childUserId
SPLIT_ACC(2) (split of an account from a user)
(orig:0 => simultaneous play (=> add of a "not-smurf" entry),
orig:1 => add "not-smurf" entry if admin chose "prevent redetecting as smurf")
(subType:0 => new independant account (newUserid=accountId),
subType:1: join with another user)
event params: oldUserId, newUserId, accountId
ADD_PROB_SMURF(3) (add of a "probable-smurf" entry)
(orig:0 => shared dynamic ip and subType=0)
(subType:0 => no conflict with any "not-smurf" entry,
subType:1 => conflict with "not-smurf" entry, but no modification)
event params: accountId1, accountId2 (accountId1 < accountId2)
DEL_PROB_SMURF(4) (removal of a "probable-smurf" entry)
(orig:0 => simultaneous play or account join,
orig:1 => if smurfs.orig=0 a checkbox "prevent redetecting as smurf" is displayed which tells if a "not-smurf" entry must be added)
(subType:0 => preparation of a JOIN_ACC for join of 2 users (=> no other modification of the smurfs table)
subType:1 => simultaneous play (=> replaced by a "not-smurf" entry)
subType:2 => retroactive simultaneous play preventing a join of 2 users (=> replaced by a "not-smurf" entry)
subType:3 => removal of a manual probable smurf)
event params: accountId1, accountId2 (accountId1 < accountId2)
ADD_NOT_SMURF(5) (add of a "not-smurf" entry)
(subType:0 => account split (if orig:0, then it's a simultaneous play)
subType:1 => simultaneous play cancelling a probable smurf
subType:2 => retroactive simultaneous play preventing a join of 2 users
subType:3 => removal of a manual probable smurf)
event params: accountId1, accountId2
DEL_NOT_SMURF(6) (removal of a "not-smurf" entry)
(orig:1, subType = orig of the smurfs entry)
event params: accountId1, accountId2
SET_STARTSKILL(7) (assignment of a start skill value to an account)
(subType:0 => new start skill value assigned to a main user account
subType:1 => new start skill value assigned to a secondary account
subType:2 => existing start skill value modified for a main user account
subType:3 => existing start skill value modified for a secondary account)
event params: accountId, modShortName, startSkill
RESET_STARTSKILL(8) (reset of a start skill value of an account)
(subType:0 => start skill value reset for a main user account
subType:1 => start skill value reset for a secondary account)
event params: accountId, modShortName