Page 1 of 1

How do I send reasons to clients when kicking players offline or banning player accounts

Posted: 16 May 2024, 14:09
by troymreamer
How do I send reasons to clients when kicking players offline or banning player accounts

Re: How do I send reasons to clients when kicking players offline or banning player accounts

Posted: 16 May 2024, 15:53
by Lapo
Hi,
depends on how you're banning/kicking users. If you're doing it manually via the AdminTool, the admin UI provides you with a text field to specify a message for the player.
If you want to do this via code, then the server API provide the banUser() and kickUser() methods where you can specify the reason as well. See here: https://docs2x.smartfoxserver.com/api-d ... FSApi.html

Finally there's also auto-banning from the anti-flood and bad-words filters, which are configurable from the Admin UI and provide the ability to specify a message for the client.

Cheers