minetest-go/mtui

xban integration

Closed this issue · 0 comments

info

local ip_name_list, banned, last_record = xban.get_info("test")
return {ip_name_list=ip_name_list, banned=banned, last_record=last_record}
{
  "banned": false,
  "ip_name_list": {
    "172.30.0.1": true,
    "test": true
  }
}
{
  "banned": true,
  "ip_name_list": {
    "172.30.0.1": true,
    "test": true
  },
  "last_record": {
    "expires": 1665063500,
    "reason": "stuff",
    "source": "moderatoruser",
    "time": 1665060109
  }
}

ban

return xban.ban_player("test", "moderatoruser", 1665059900+3600, "stuff")
true

unban

return xban.unban_player("test", "moderatoruser")
true