|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Unbans one or more users that were previously banned from a Room. More...
#include <UnbanUsersFromRoomRequest.h>
Public Member Functions | |
| UnbanUsersFromRoomRequest (std::vector< std::string > userNames, std::shared_ptr< entities::Room > theRoom, std::optional< std::string > message=std::nullopt) | |
| Creates a new UnbanUsersFromRoomRequest unbanning a group of users. | |
Unbans one or more users that were previously banned from a Room.
To be able to unban a user the requester must be the Room's owner, or have Moderator or Administrator privileges. Up to 10 users can be unbanned with a single request.
Users are identified by name rather than by id: a banned user is not in the Room any more, so there is no User object to refer to.
The server does not acknowledge this request: there is no success or error event to listen for. An unban the server refuses (unknown Room, insufficient privileges, more than 10 users) is logged server-side and silently dropped.
|
inline |
Creates a new UnbanUsersFromRoomRequest unbanning a group of users.
Pass it to SmartFox::send for the request to be performed.
| userNames | The names of the users to unban; at most 10. A single user is unbanned by passing a one-element list: { "Kermit" }. |
| theRoom | The Room the users were banned from. |
| message | An optional message sent to the users before they are unbanned; if provided, the unban follows it with a short delay (2-3 seconds). |