Garry's Mod Wiki

server_removeban

Description

Called when a Player is unbanned using the removeid or removeip command.

If the player was banned using banip was used the networkid will be an empty string.
If the player was banned using banid was used the ip will be an empty string.

Members

string networkid
The SteamID of the banned Player.
string ip
The IPAddress of the banned Player.
string by
The Person who unbanned the Player. Can be Console.

Examples

Example

This is a basic template with the purpose of including all arguments / table variables to make it easily known which values can be accessed.

gameevent.Listen( "server_removeban" ) hook.Add( "server_removeban", "server_removeban_example", function( data ) local id = data.networkid // Same as Player:SteamID() local address = data.ip // Same as Player:IPAddress() local by = data.by // The Person who banned the Player. Can be Console. // Called when a Player is unbanned. end )