KickUserRequest

Kicks a User out of the server.


The current User must have administration or moderation privileges in order to kick another User (see the SFSUser#privilegeId property).

The request allows sending a message to the kicked User (i.e. to explain the reason of the upcoming disconnection), which is delivered by means of the SFSEvent.MODERATOR_MESSAGE event.

Differently from a User being banned (see the BanUserRequest), a kicked User is still able to reconnect to the SmartFoxServer instance immediately.

Constructor

new KickUserRequest(userId, messageopt, delaySecondsopt)

Creates a new instance of the KickUserRequest class.
Pass the instance to the SmartFox#send method to validate and execute the request.
Parameters:
NameTypeAttributesDefaultDescription
userIdnumberThe id of the User to be kicked.
messagestring<optional>
nullA custom message to be delivered to the User before the kicking occurs; if null, the preset message configured in the SmartFoxServer Administration Tool is used.
delaySecondsnumber<optional>
5The delay in seconds before the User is kicked after receiving the kick message.