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

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
troymreamer
Posts: 1
Joined: 16 May 2024, 14:00

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

Post by troymreamer »

How do I send reasons to clients when kicking players offline or banning player accounts
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

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

Post 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
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply