GetBanUsername: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server function}} This function will return the username of the specified ban element. ==Syntax== <syntaxhighlight lang="lua"> string getBanUsername ( ban theBan ) </syntaxhighlight> ===Required...) |
(Deprecated function) |
||
(7 intermediate revisions by 7 users not shown) | |||
Line 1: | Line 1: | ||
{{Deprecated|getBanNick}} | |||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
This function will return the username of the specified [[ban]] | This function will return the username of the specified [[ban]]. | ||
==Syntax== | ==Syntax== | ||
Line 9: | Line 10: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''theBan:''' The [[ban]] | *'''theBan:''' The [[ban]] in which you wish to retrieve the username of. | ||
===Returns=== | ===Returns=== | ||
Returns a ''string'' of the username if everything was | Returns a ''string'' of the username if everything was successful, ''false'' if invalid arguments are specified if there was no username specified for the [[ban]]. | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function retrieveBan(theBan) | |||
local ban = getBanUsername(theBan) | |||
if ban then | |||
outputChatBox("The following bans username is: "..ban, getRootElement(), 255,255,255, true) | |||
end | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Admin functions}} | {{Admin functions}} | ||
[[ru:getBanUsername]] |
Latest revision as of 15:49, 6 August 2016
This function is deprecated. This means that its use is discouraged and that it might not exist in future versions. | |
Please use getBanNick instead. |
This function will return the username of the specified ban.
Syntax
string getBanUsername ( ban theBan )
Required Arguments
- theBan: The ban in which you wish to retrieve the username of.
Returns
Returns a string of the username if everything was successful, false if invalid arguments are specified if there was no username specified for the ban.
Example
function retrieveBan(theBan) local ban = getBanUsername(theBan) if ban then outputChatBox("The following bans username is: "..ban, getRootElement(), 255,255,255, true) end end