GetBansXML: Difference between revisions
Jump to navigation
Jump to search
m (Visual improvement) |
m (Changed "DeprecatedWithAlt" template to "Deprecated") |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server function}} | {{Server function}} | ||
{{ | {{Deprecated|getBans|}} | ||
This function retrieves the root [[xmlnode]] of the ban file (server/mods/deathmatch/banlist.xml). | This function retrieves the root [[xmlnode]] of the ban file (server/mods/deathmatch/banlist.xml). |
Latest revision as of 16:36, 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 getBans instead. |
This function retrieves the root xmlnode of the ban file (server/mods/deathmatch/banlist.xml).
Syntax
xmlnode getBansXML ()
Returns
Returns a xmlnode, false if something went wrong.
Example
This example prints the amount of bans in the banfile to the chat when player uses command banamount.
function tellPlayerBanAmount ( thePlayer ) local bansNode = getBansXML () -- get the root node of ban file local children = xmlNodeGetChildren ( bansNode ) -- get the children (bans) of the root xml node outputChatBox ( "There are " .. #children .. " bans in the ban file.", thePlayer ) -- print the size of children table to the chat end addCommandHandler ( "banamount", tellPlayerBanAmount )
See Also
- addBan
- banPlayer
- getBanAdmin
- getBanIP
- getBanNick
- getBanReason
- getBanSerial
- getBanTime
- getBanUsername
- getBans
- getUnbanTime
- isBan
- kickPlayer
- setBanAdmin
- setBanNick
- setBanReason
- setUnbanTime
- reloadBans
- removeBan