Disconnect a user from a game room

0 votes
Hi,

I am using AppWarpS2 Server Side SDK. I want to disconnect/Kick an idle player from game room. I can keep track if the player is idle or not. But how can I kick/disconnect him from the room?

Thanks

Apratim.
asked Nov 16, 2014 in AppWarpS2 by apratim.056 (28 points)

1 Answer

+1 vote
 
Best answer
Hi,

There is a method named removeUser in IRoom. You can remove any user using this method. This method accetps two parameters, one is 'user' which represents the IUser you want to kick out. Other one is 'sendNotification' which defines whether you want to send a user left room notification to subscribers of the room or not.

Thanks
answered Nov 17, 2014 by Suyash Mohan (900 points)
selected Nov 17, 2014 by apratim.056
Thanks for answer. Is the notification sent both the subscribed users and the user being kicked?
The notification is sent to all subscribers. But since the user kicked out is no more a subscriber to that room, he will not receive this notification.
You can send him a chat message with details for why you kicked him out.
So, If I want to notify that user that he has been kicked how could I do that? Is there some other process from which the user can know that he has been kicked from the room, and he needs to subscribe the lobby now.
As I told you in my last comment you can simply send him a chat message to let him know that he has been kicked out
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...