Ban reason not working

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

Moderators: Lapo, Bax

noping
Posts: 16
Joined: 11 May 2020, 12:38

Ban reason not working

Postby noping » 12 Oct 2020, 15:40

Hi,

I have implemented the ban functionality and it mostly works
If the user is logged in when the ban occurs, I am able to download this message and show it to the user, which is great.

Now I have 3 issues.

1. On subsequent logins, the client triggers SFSEvent.LOGIN_ERROR with a generic "user is banned" message. However, it does not download the original Ban Reason that was recorded and can still be seen in the "Ban Manager" Reason column.

2. Also is there a way to download the BAN expiration time, so the user can see it?

3. Lastly, if I ban the user programmatically in an extension, it works, however, the reason string does not make it to the Reason column in "Ban Manager"
getApi().banUser(user , null, "You have been banned for 10 minutes for quitting the game", BanMode.BY_NAME, 10, 0);

Thank you very much!
User avatar
Lapo
Site Admin
Posts: 21723
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Ban reason not working

Postby Lapo » 12 Oct 2020, 15:46

noping wrote:Hi,
1. On subsequent logins, the client triggers SFSEvent.LOGIN_ERROR with a generic "user is banned" message. However, it does not download the original Ban Reason that was recorded and can still be seen in the "Ban Manager" Reason column.

Yes, the ban message is sent at the moment of the banning to the client, which will receive it and see the reason why he/she was banned.
Subsequent logins will simply report an error, saying that the user trying to log in is currently banned.

2. Also is there a way to download the BAN expiration time, so the user can see it?

No, this is stuff relevant to admins.
You could add information relative to the duration of the ban in the message sent at the moment of banning.

3. Lastly, if I ban the user programmatically in an extension, it works, however, the reason string does not make it to the Reason column in "Ban Manager"
getApi().banUser(user , null, "You have been banned for 10 minutes for quitting the game", BanMode.BY_NAME, 10, 0);

Thanks.
We'll have to test if we can reproduce it. What version of SFS2X are you using?

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
noping
Posts: 16
Joined: 11 May 2020, 12:38

Re: Ban reason not working

Postby noping » 12 Oct 2020, 18:06

Thank you,

Using the latest 2.16.2,

BTW I love the product

Return to “SFS2X Questions”

Who is online

Users browsing this forum: DavinVicy, DerikFent, JerodSa, Kevengar and 25 guests