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

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

Help Implementing ban an offline user in a button

Postby Ninjaoninja2 » 21 Feb 2015, 00:55

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: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Help Implementing ban an offline user in a button

Postby Lapo » 22 Feb 2015, 10:29

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
User avatar
WoWoX
Posts: 16
Joined: 18 May 2013, 13:25

Re: Help Implementing ban an offline user in a button

Postby WoWoX » 01 Mar 2015, 01:14

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.

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 57 guests