Click or drag to resize

ServerBlockIPAddress Method

Blocks an IP address from further communication with the server for a set amount of time (with wildcards allowed). Players trying to connect to the server with a blocked IP address will receive the generic "You are banned from this server." message. Players that are online on the specified IP before the block will timeout after a few seconds and, upon reconnect, will receive the same message.

Namespace:  SampSharp.GameMode.SAMP
Assembly:  SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public static void BlockIPAddress(
	string ip,
	TimeSpan time
)

Parameters

ip
Type: SystemString
The IP to block.
Remarks
Wildcards can be used with this function, for example blocking the IP '6.9.*.*' will block all IPs where the first two octets are 6 and 9 respectively. Any number can be in place of an asterisk.
time
Type: SystemTimeSpan
The time that the connection will be blocked for. 0 can be used for an indefinite block.
See Also