Jump to content

PlayerDB.txt

From fCraft Wiki
Revision as of 03:46, 22 August 2013 by F (talk | contribs)

Encoding

Numbers: All numbers are nonnegative integers, written out with decimal digits. Empty Int32/Int64 fields are interpreted as 0.

Dates: Dates are saved as number of seconds since UTC Unix Timestamp. Value of "0" and empty DateTime fields are interpreted as "never" (DateTime.MinValue).

IP Addresses: IPs are serialized in dotted decimal notation (e.g. "192.168.1.1"). Only IPv4 addresses are used — no IPv6. Empty string, any invalid value, or "255.255.255.255" are interpreted as "unknown" address.

Strings: Strings are encoded as ASCII. Escaped characters are ,, \n, and \r — they are replaced with \xFF, \xFE, and \xFD respectively. There is no limit on string length. Parsing ends at the nearest comma.

Columns

(Note that order in this list starts with 1, not 0)

Order Name Data Type Remarks
1 Name String Invalid values cause whole record to be skipped. Regex used to verify validity:

^([a-zA-Z0-9._]{2,16}|[a-zA-Z0-9._]{1,15}@\d*)$

2 LastIP IPAddress May be "none" for players whose records were imported, or who were ranked by-name before ever joining.
3 Rank String Full rank name. Saved as "RankName#UUID", where UUID is rank's universally unique identifier. fCraft can parse rank name without ID as well. If parsing fails, default rank is assigned to player. Not escaped.
4 RankChangeDate DateTime Defaults to "never" (empty string) for players who have never been ranked.
5 RankChangedBy String Defaults to empty string for players who have never been ranked. Name of a player (usually). Does not have to be a valid player name though. Escaped.
6 BanStatus Enum One character enum. Defaults to empty string, meaning neither banned nor exempt.
  • b = player is banned.
  • x = player is exempt from all bans.
  • Default = player is neither banned nor exempt.
7 BanDate DateTime Defaults to "never" (empty string) for players who have never been banned.
8 BannedBy String Only read if BanDate was set. Defaults to empty string for players who have never been banned. Name of a player (usually). Does not have to be a valid player name though. Escaped.
9 UnbanDate DateTime Defaults to "never" (empty string) for players who have never been banned.
10 UnbannedBy String Only read if UnbanDate was set. Defaults to empty string for players who have never been unbanned. Name of a player (usually). Does not have to be a valid player name though. Escaped.
11 BanReason String Only read if BanDate was set. May be blank. Escaped.
12 UnbanReason String Only read if UnbanDate was set. May be blank. Escaped.