-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbans.lua
42 lines (36 loc) · 1.19 KB
/
bans.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---@meta
---Bans
-------
---Returns a list of all bans formatted as string.
---@return string
function minetest.get_ban_list() end
---Returns list of bans matching IP address or name formatted as string.
---@param ip_or_name string
---@return string
function minetest.get_ban_description(ip_or_name) end
---Ban the IP of a currently connected player.
---
---Returns boolean indicating success.
---@param name string
---@return boolean
function minetest.ban_player(name) end
---Remove ban record matching IP address or name.
---@param ip_or_name string
function minetest.unban_player_or_ip(ip_or_name) end
---Disconnect a player with an optional reason.
---
---Returns boolean indicating success (false if player nonexistant).
---@param name string
---@param reason string|nil
---@return boolean
function minetest.kick_player(name, reason) end
---Disconnect a player with an optional reason,
---this will not prefix with `Kicked:` like `kick_player`.
---
---If no reason is given, it will default to `Disconnected`.
---
---Returns boolean indicating success (false if player nonexistant).
---@param name string
---@param reason? string
---@return boolean
function minetest.disconnect_player(name, reason) end