how to ban/kick people

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

Moderators: Lapo, Bax

skybucks100
Posts: 81
Joined: 15 Aug 2010, 23:16
Contact:

how to ban/kick people

Postby skybucks100 » 15 Aug 2010, 23:20

I was wondering... Is there a way to ban people if they dont get banned by the auto ban? Or if they broke one of your rules How could i ban them?
Last edited by skybucks100 on 17 Aug 2010, 04:51, edited 1 time in total.
Best Regards,
Skybucks100
User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 16 Aug 2010, 00:48

With user being a 'moderator', you can manually ban a user by doing something like this:

var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"

smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user

smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user
Smartfox's forum is my daily newspaper.
skybucks100
Posts: 81
Joined: 15 Aug 2010, 23:16
Contact:

Postby skybucks100 » 16 Aug 2010, 00:52

BigFIsh wrote:With user being a 'moderator', you can manually ban a user by doing something like this:

var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"

smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user

smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user


Is there a way i could make a website like... www.mybanningwebsiteexample.com/bannauser.(what ever it would be)
Best Regards,

Skybucks100
User avatar
WoWoX
Posts: 16
Joined: 18 May 2013, 13:25

Re:

Postby WoWoX » 06 Oct 2013, 19:41

skybucks100 wrote:
BigFIsh wrote:With user being a 'moderator', you can manually ban a user by doing something like this:

var dataObj = {}
dataObj.id = userId.toString()
dataObj.msg = "Your msg"

smartFox.sendXtMessage("$dmn", "ban", dataObj) //ban a user

smartFox.sendXtMessage("$dmn", "kick", dataObj) //kick a user


Is there a way i could make a website like... http://www.mybanningwebsiteexample.com/bannauser.(what ever it would be)

Yes, you could set your game up with a database and use PHP to ban users.
User avatar
zachofthegolden1
Posts: 89
Joined: 05 Sep 2011, 19:31

Re: how to ban/kick people

Postby zachofthegolden1 » 11 Jan 2014, 16:15

When banning a user for example on my game i have 2 ways of banning. One of them is a function in my main extension set to kick the user and set active to 0 in the database so on login if active = 0 show permenant ban message. Or you could use the one that is part of smartfox mentioned above for tempory bans etc.
-ZG1

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 22 guests