Click or drag to resize

ServerServiceBlockIpAddress 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 specific amount of seconds and, upon reconnect, will receive the same message. Effect takes place only when server is running (it is not persistent).

Namespace:  SampSharp.Entities.SAMP
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public void BlockIpAddress(
	string ipAddress,
	TimeSpan time = default
)

Parameters

ipAddress
Type: SystemString
The ip address to block.
time (Optional)
Type: SystemTimeSpan
The time that the connection will be blocked for. Use a 0-length timespan for an indefinite block.

Implements

IServerServiceBlockIpAddress(String, TimeSpan)
See Also