diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-02-19 16:26:44 +0100 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2018-02-19 16:26:44 +0100 |
commit | f1adf89411057e477432a507d880234c9dfbb212 (patch) | |
tree | 022bd5141e79606cb695de3583c9d322fdff2ade | |
parent | 86f6923b7270cf10dc49051abb0df5e314b151e0 (diff) | |
download | xban2-f1adf89411057e477432a507d880234c9dfbb212.tar.gz xban2-f1adf89411057e477432a507d880234c9dfbb212.tar.bz2 xban2-f1adf89411057e477432a507d880234c9dfbb212.zip |
added feature to set properties
-rw-r--r-- | init.lua | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -75,6 +75,16 @@ function xban.add_record(player, record) table.insert(e.record, record) end +function xban.add_property(player, property, value) + -- adds a property to a player, for instance a "jailed" property which indicates that a player is jailed + local e = xban.find_entry(player, true) + e[property] = value +end +function xban.get_property(player, property) + local e = xban.find_entry(player, true) + return e[property] +end + function xban.ban_player(player, source, expires, reason) --> bool, err if xban.get_whitelist(player) then |