SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
sfs3::requests::KickUserRequest Class Reference

Kicks a user out of the server. More...

#include <KickUserRequest.h>

Inheritance diagram for sfs3::requests::KickUserRequest:
[legend]

Public Member Functions

 KickUserRequest (int32_t userId, std::string message="", int32_t delaySeconds=5)

Static Public Attributes

static const int32_t MAX_DELAY_SECONDS = 10
 The longest delay the server accepts, in seconds.

Detailed Description

Kicks a user out of the server.

The current user must have administration or moderation privileges to kick another user (see User::getPrivilegeId()). The request can carry a message explaining the reason of the disconnection, which reaches the kicked user as a MODERATOR_MESSAGE event.

A kicked user can reconnect to the server straight away, unlike a banned one.

See also
event::SFSEvent::MODERATOR_MESSAGE
entities::User::getPrivilegeId
BanUserRequest

Constructor & Destructor Documentation

◆ KickUserRequest()

sfs3::requests::KickUserRequest::KickUserRequest ( int32_t userId,
std::string message = "",
int32_t delaySeconds = 5 )
inline
Parameters
userIdthe id of the user to kick
messagethe message delivered to the user before kicking him; when empty, the default message set in the SmartFoxServer 3 Administration Tool is used
delaySecondsthe number of seconds between the kick message and the actual disconnection; must be within 0 and 10

The documentation for this class was generated from the following files:
  • requests/KickUserRequest.h
  • requests/KickUserRequest.cpp