SmartFoxServer 2X C++ API
|
Change the capacity of a Room (maxUsers and maxSpectators) at runtime. More...
#include <ChangeRoomCapacityRequest.h>
Inherits Sfs2X::Requests::BaseRequest.
Public Member Functions | |
ChangeRoomCapacityRequest (boost::shared_ptr< Room > room, long int newMaxUsers, long int newMaxSpect) | |
Constructor More... | |
Change the capacity of a Room (maxUsers and maxSpectators) at runtime.
This request might fail if the Room was configured not be re-sizable or if the User sending the request is not the owner of the Room. Moderators and Administrator can override this last constraint.
It is possible to "shrink" the Room capacity so that maxUsers < userCount.
In this case nothing will happen to the "extra" users.
As soon as clients will leave the Room the userCount will get down to the new maxUsers value.
Sfs2X::Requests::ChangeRoomCapacityRequest::ChangeRoomCapacityRequest | ( | boost::shared_ptr< Room > | room, |
long int | newMaxUsers, | ||
long int | newMaxSpect | ||
) |
Constructor
room | the Room to resize |
newMaxUsers | the new maxUsers value (use -1 if don't want to change the current value) |
newMaxSpect | the new maxSpect value (use -1 if don't want to change the current value) |