BanUserRequest Constructor (Int32, String, BanMode, Int32, Int32) |
Creates a new BanUserRequest instance.
Namespace:
Sfs2X.Requests
Assembly:
SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax public BanUserRequest(
int userId,
string message,
BanMode banMode,
int delaySeconds,
int durationHours
)
Parameters
- userId
- Type: SystemInt32
The id of the user to be banned. - message
- Type: SystemString
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.RequestsBanMode
One of the ban modes defined in the BanMode class (default = BanMode.BY_NAME). - delaySeconds
- Type: SystemInt32
The number of seconds after which the user is banned after receiving the ban message (default = 5). - durationHours
- Type: SystemInt32
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