ReloadBans: Difference between revisions
Jump to navigation
Jump to search
(oop) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 5: | Line 5: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool reloadBans () | bool reloadBans() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[Ban]].reload}} | |||
===Returns=== | ===Returns=== | ||
Line 12: | Line 14: | ||
==Example== | ==Example== | ||
This example add "reloadban" to reload the server ban list file. | This example add command "reloadban" to reload the server ban list file. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function ReBan (player) | function ReBan (player) | ||
Line 29: | Line 31: | ||
==See Also== | ==See Also== | ||
{{Admin functions}} | {{Admin functions}} | ||
Latest revision as of 21:10, 24 October 2020
This function will reload the server ban list file.
Syntax
bool reloadBans()
OOP Syntax Help! I don't understand this!
- Method: Ban.reload(...)
Returns
Returns true if the ban list was reloaded successfully, false otherwise.
Example
This example add command "reloadban" to reload the server ban list file.
function ReBan (player) if (reloadBans()) then outputChatBox("Bans has been reloaded successfully.",player) else outputChatBox("Failed to Reload Bans.",player) end end addCommandHandler("reloadban",ReBan)
Requirements
Minimum server version | 1.3.0-9.03931 |
---|---|
Minimum client version | n/a |
Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.0-9.03931" />
See Also
- addBan
- banPlayer
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBanSerial
- getBanTime
- getBanUsername
- getBans
- getUnbanTime
- isBan
- kickPlayer
- setBanAdmin
- setBanNick
- setBanReason
- setUnbanTime
- reloadBans
- removeBan