diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-02-16 14:24:27 +0100 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-02-16 14:24:27 +0100 |
commit | 86f6923b7270cf10dc49051abb0df5e314b151e0 (patch) | |
tree | 44786b28cdb735a91cb4d693fc0d8a1d5e7eac4a /doc/API.md | |
parent | db0f91aa0a7e9bd085b957be20019ca924306131 (diff) |
Added reason to unban, documented API changes
Diffstat (limited to 'doc/API.md')
-rw-r--r-- | doc/API.md | 37 |
1 files changed, 35 insertions, 2 deletions
@@ -16,14 +16,47 @@ Ban a player and all of his/her alternative names and IPs. ### unban_player -`xban.unban_player(player_or_ip, source)` +`xban.unban_player(player_or_ip, source, reason)` + +Unban a player and all of his/her alternative names and IPs. A reason +may be given for this unbanning, so other moderators can follow your +thoughts. -Unban a player and all of his/her alternative names and IPs. #### Arguments: * `player_or_ip` - Player to search for and unban. * `source` - Source of the ban. See note 2 below. +* `reason` - Reason for unbanning. + +### add_record: + +`xban.add_record(player, record)` + +Adds a record to the player's criminal record. + +#### Arguments: + +* `player` - Name of a player +* `record` - a xban record (see below) + +### Player record format: + + + local record = { + source = "admin", + time = os.time(), + expires = nil, + reason = "bad behaviour", + type = "ban", + } + +* `source` - who issued the record +* `time` - time at which the record was issued +* `expires` - time at which the record expires, `nil` for never +* `reason` - reason for record +* `type` - type of record. + ### Notes |