Click or drag to resize

IServerServiceBlockIpAddress 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-local+709673996c0cc3c0733358a87691d1009326afa7
Syntax
C#
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.
See Also