Kick and Ban (Please Read)
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Kick and Ban (Please Read)
Hello!
I understand this is both in the docs and a few posts on this subject. I gathered this:
------------------
var dataObj:Object = {}
dataObj.id = userId.toString()
dataObj.msg = msg
smartFox.sendXtMessage("$dmn", "kick", dataObj)
----------------
Where exactly does that go? How does that work?? I honestly cant find any other information about this matter, apart from the code above.
Please reply! D:
Thanks Guys,
Jack
I understand this is both in the docs and a few posts on this subject. I gathered this:
------------------
var dataObj:Object = {}
dataObj.id = userId.toString()
dataObj.msg = msg
smartFox.sendXtMessage("$dmn", "kick", dataObj)
----------------
Where exactly does that go? How does that work?? I honestly cant find any other information about this matter, apart from the code above.
Please reply! D:
Thanks Guys,
Jack
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Kick and Ban (Please Read)
Hello.
That code goes in the client code. Please keep in mind that the user needs to be a Moderator in order to be able to send that request, otherwise that request will be ignored by the server.
That code goes in the client code. Please keep in mind that the user needs to be a Moderator in order to be able to send that request, otherwise that request will be ignored by the server.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Kick and Ban (Please Read)
Hey rjgtav,
Thanks for getting back to me. When I put this in the SmartFoxClient, do I execute the process by saying something in the chat bar? Is it something like: ban <user> / kick <user>
Thanks,
Jack
Thanks for getting back to me. When I put this in the SmartFoxClient, do I execute the process by saying something in the chat bar? Is it something like: ban <user> / kick <user>
Thanks,
Jack
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Kick and Ban (Please Read)
You can do it whatever way you want. If you want, you can use a simple button. Simply add that code to a function and call it when ever you need it.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Kick and Ban (Please Read)
Alright:)
Yet, is it the user ID you target?? I dont want to only be able to kick myself.
I've never seen that code mak up before, and is extremely confusing. Please explain how to use it
Whats the client and what is data obj? How can a button define a specific user???? The code seems somewhat incomplete. Argh, Im confused.
help!
jack
Yet, is it the user ID you target?? I dont want to only be able to kick myself.
I've never seen that code mak up before, and is extremely confusing. Please explain how to use it
Whats the client and what is data obj? How can a button define a specific user???? The code seems somewhat incomplete. Argh, Im confused.
help!
jack
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Kick and Ban (Please Read)
Bosskafett , you should create a function (activated by a button or what else) which executes the code you wrote in the first post. The userID is the id of the user you want to kick or ban. Also, in order to kick or ban the user running that function must have moderation privileges.
Sorry, but I believe you really need to better study the SFS documentation and API documentation.
Sorry, but I believe you really need to better study the SFS documentation and API documentation.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Kick and Ban (Please Read)
Why thank you Baxy, I understand now 
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Kick and Ban (Please Read)
So you add a moderator to the Config.xml but the user isnt a moderator when you login. :/
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Kick and Ban (Please Read)
Hmm... Have you restarted the server after you added the user to the config? And is the username you entered on the config exactly the same of that user?
And are you using custom-login? If so, you need to manually set that user a moderator, after the successful login...
And are you using custom-login? If so, you need to manually set that user a moderator, after the successful login...
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Kick and Ban (Please Read)
Its not custom login. I use PHP for that, its strange. This is how its set out:
<Moderators status="on">
<Mod name="Jack"/>
</Moderators>
Is that right??
Cheers,
jack
<Moderators status="on">
<Mod name="Jack"/>
</Moderators>
Is that right??
Cheers,
jack
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
Re: Kick and Ban (Please Read)
Hmm... Moderators only work if you specify both an username and a password... To increase security... Otherwise anyone could be a moderator... It was only needed to login with the mod's username. You configure it like:
<Moderators status="on">
<Mod name="modName" pwd="modPass" />
</Moderators>
<Moderators status="on">
<Mod name="modName" pwd="modPass" />
</Moderators>
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
-
Bosskafett
- Posts: 41
- Joined: 24 Jan 2012, 00:04
Re: Kick and Ban (Please Read)
Alright, cheers mate;

if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D