SetBanNick: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
{{New feature/item|3.0141|1.4.1|7093|This function sets a new nick for a [[ban]].}} | {{New feature/item|3.0141|1.4.1|7093|This function sets a new nick for a [[ban]].}} | ||
Revision as of 17:12, 31 March 2015
This function sets a new nick for a ban.
Syntax
bool setBanNick ( ban theBan, string theNick )
Required Arguments
- theBan: The ban you want to change the nick of.
- theNick: A string representing the nick you want to set the ban to.
Returns
Returns true if changed, false otherwise.
Example
-- this example looks if there is a ban with nick 'Steve', and if is, it changes ban nick to 'Mike'
function changeBanNick()
for i,ban in pairs(getBans()) do
if getBanNick(ban) == "Steve" then
setBanNick(ban,"Mike")
end
end
end
addCommandHandler("setbannick",changeBanNick)
See Also
- addBan
- banPlayer
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBanSerial
- getBanTime
- getBans
- getUnbanTime
- isBan
- kickPlayer
- setBanAdmin
- setBanNick
- setBanReason
- setUnbanTime
- reloadBans
- removeBan