Help Implementing ban an offline user in a button

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
Ninjaoninja2
Posts: 204
Joined: 22 Sep 2013, 23:33

Help Implementing ban an offline user in a button

Post by Ninjaoninja2 »

Hi there,
I have made a ban and kick button using the kick and ban functions supplied with the SFS API but the ban and kick buttons can only ban and kick users who are online, I need to know how I can use the banOfflineUser function in SFS on a button, is there a way?
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Help Implementing ban an offline user in a button

Post by Lapo »

Hi,
no banning an offline user can be done only from server code or from the Admin Tool.

The client-side ban/kick functions will work only for users that are online.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
WoWoX
Posts: 16
Joined: 18 May 2013, 13:25

Re: Help Implementing ban an offline user in a button

Post by WoWoX »

You cannot ban an offline user using the admin extension.
I would recommend to make a database with a users table. For each user, have a banned column. Create an extension to check upon login for the value of this column and refuse the login if they are banned.
Post Reply