This fourth post about Milestone 2′s database structure describes all administration-related information. This includes administrative accounts (which are tied to, but separate from user accounts), the administration log, and of course the banhammer.
Administrators
An administrative account is an account to which special privileges (stored through a bit mask) are given. Administrative accounts are identified by a name and can connect to a specific administration interface using a password (which must differ from the administrator’s “normal” password), for which a SHA1 hash and a MD5 hash are stored.
Administrative log
In order to make administrators accountable for their actions, a log of all administrative actions is kept. An administrative log entry consists in a time and date, a log level and a message. Each log entry is linked to the administrator whose actions are being logged. Administrative log entries are purged on a regular basis by the game server.
The banhammer
The “banhammer” (which is the tool used to ban users from the game) is more complex that the name would indicate. In the description below, “an administrator” means “an administrator with the proper privileges”.
A ban request is emitted by an administrator regarding a validated account. The request includes a reason why the account should be banned, as well as the time and date at which it was emitted. There can be only one ban request for a given account at any time; in addition, it is impossible to request a ban on an account which is already banned.
If no action is taken within one week (that is the default value, as determined by the game’s parameters – it may change within a single run of the game) of a request’s emission, the request is archived. Its expiration time and date are stored.
A ban request may be rejected by any administrator, including the administrator who initially requested the ban. When this happens, the request is archived, along with the time and date at which it was rejected and the reason for which it was rejected.
Finally, a ban request may be validated by an administrator (as long as the validating administrator is not the one who originally requested the ban). In this case, the time and date at which the request was validated, as well as the validating administrator are stored. The account becomes banned as soon as the request is validated.
If the account that was banned was still active, it is “redeemable” for the next 48h – the associated empire is not deleted. After 48h, or if the account was originally disabled, it becomes fully banned. In any case, a ban may be lifted, in which case the ban request is archived (along with the time and date at which it was lifted) and the account is returned to its previous state.