BanSerial: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server function}} {{Needs_Checking|Does this take optional reason arguments?}} This function will ban the specified serial number from the server. ==Syntax== <syntaxhighlight lang="lua"> b...) |
m (Changed "DeprecatedWithAlt" template to "Deprecated") |
||
(4 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
{{ | {{Deprecated|addBan|}} | ||
This function will ban the specified serial number from the server. | |||
This function will ban the specified [[serial]] number from the server. | |||
==Syntax== | ==Syntax== |
Latest revision as of 16:33, 13 February 2015
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use addBan instead. |
This function will ban the specified serial number from the server.
Syntax
bool banSerial ( string theSerial )
Required Arguments
- theSerial: The serial to ban from this server
Returns
Returns true if the serial was banned succesfully, false if invalid arguments are specified.
Example
This example lets a client (console or player) ban a serial if he has ACL rights.
--Add the "banserial" command handler function banSerialCommand ( theClient, commandName, bannedSerial ) -- Give the player a nice error if he doesn't have rights if ( hasObjectPermissionTo ( theClient, "function.banSerial" ) ) --Ban the serial banSerial ( bannedSerial ) outputChatBox ( "banserial: Serial " .. bannedSerial .. " successfully banned", theClient ) else outputChatBox ( "banserial: You don't have enough permissions", theClient ) end end addCommandHandler ( "banserial", banSerialCommand )
See Also
- addBan
- banPlayer
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBanSerial
- getBanTime
- getBanUsername
- getBans
- getUnbanTime
- isBan
- kickPlayer
- setBanAdmin
- setBanNick
- setBanReason
- setUnbanTime
- reloadBans
- removeBan