Creates a new BanUserRequest instance.

Namespace: Sfs2X.Requests
Assembly: SmartFox2X (in SmartFox2X.dll) Version: 1.7.3.0 (1.7.3)

Syntax

C#
public BanUserRequest(
	int userId,
	string message,
	BanMode banMode,
	int delaySeconds,
	int durationHours
)

Parameters

userId
Type: System..::..Int32
The id of the user to be banned.
message
Type: System..::..String
A custom message to be delivered to the user before banning him; if null, the default message configured in the SmartFoxServer 2X Administration Tool is used (default = null).
banMode
Type: Sfs2X.Requests..::..BanMode
One of the ban modes defined in the BanMode class (default = BanMode.BY_NAME).
delaySeconds
Type: System..::..Int32
The number of seconds after which the user is banned after receiving the ban message (default = 5).
durationHours
Type: System..::..Int32
The duration of the banishment, expressed in hours (default = 24).

Remarks

The instance must be passed to the SmartFox.Send method for the request to be performed.

See Also