OnUnban: Difference between revisions
Jump to navigation
Jump to search
m (See Also for server events) |
m (→Example) |
||
Line 25: | Line 25: | ||
function announceUnban( sz ) | function announceUnban( sz ) | ||
if getElementType( source ) then --Check if a player unbanned the IP/Serial | if getElementType( source ) then --Check if a player unbanned the IP/Serial | ||
outputChatBox( | outputChatBox( getPlayerName( source ) .. " unbanned " .. sz ) --Output to the chatbox saying the player has unbanned the IP/Serial | ||
end | end | ||
end | end |
Revision as of 12:29, 27 August 2009
This event is triggered when an IP address or serial is unbanned from the server.
Parameters
string theIPOrSerial
- theIPOrSerial: The IP address or serial that was unbanned from the server.
Source
The source of this event is the element that was responsible for the unbanning. If no responsible was specified, the source is the global root element.
Cancel effect
If this event is canceled, the requested unban is not performed.
Example
This example does...
root = getRootElement() function announceUnban( sz ) if getElementType( source ) then --Check if a player unbanned the IP/Serial outputChatBox( getPlayerName( source ) .. " unbanned " .. sz ) --Output to the chatbox saying the player has unbanned the IP/Serial end end addEventHandler( "onUnban", root, announceUnban ) --Adds the event handler for 'onUnban'
See Also
Server events
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled