Moderator Functions NOT WORKING

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

Moderators: Lapo, Bax

User avatar
BigFIsh
Posts: 1698
Joined: 25 Feb 2008, 19:26
Location: New Zealand

Postby BigFIsh » 02 Sep 2009, 05:32

I give up :shock:

If you want Lapo to help you, follow this posting rules and let him know the sfs basic version etc.. :)
Smartfox's forum is my daily newspaper.
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 02 Sep 2009, 08:17

I use as2.0 and my code works:

Code: Select all

if (smartfox.amIModerator){
   trace("Welcome Moderator.")
}else{
    trace("I'm a standard user")
}
smooch1502
Posts: 87
Joined: 07 Aug 2009, 11:01

Postby smooch1502 » 02 Sep 2009, 10:01

rjgtav wrote:I use as2.0 and my code works:

Code: Select all

if (smartfox.amIModerator){
   trace("Welcome Moderator.")
}else{
    trace("I'm a standard user")
}


Yes that works for me to however it wont ban or kick
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 02 Sep 2009, 10:05

to ban or kick you need another script. I haven't do that yet on my game. When i do and if you have't solve the problem yet, i'll post here
smooch1502
Posts: 87
Joined: 07 Aug 2009, 11:01

Postby smooch1502 » 02 Sep 2009, 12:28

rjgtav wrote:to ban or kick you need another script. I haven't do that yet on my game. When i do and if you have't solve the problem yet, i'll post here


Ok thanks also what was your game?
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Postby rjgtav » 02 Sep 2009, 12:55

my game hasn't released yet. I'll post a topic on this forum when i release the open beta :D
User avatar
Lapo
Site Admin
Posts: 23027
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 02 Sep 2009, 13:58

In order for the moderator function to work properly the User must login with the same name and password specified in the configuration.

Example:

Code: Select all

<Moderators status="on">
   <Mod name="Albert" pwd="Einstein" />
</Moderators>


The User must login with those same name and password.
If you do so, it will work.
The same goes for kicking and banning.

Make sure that you handle the onAdminMessage event to correctly show the Kicking/Banning message.
Lapo
--
gotoAndPlay()
...addicted to flash games
smooch1502
Posts: 87
Joined: 07 Aug 2009, 11:01

Postby smooch1502 » 03 Sep 2009, 08:56

Hi,

Thats exacturly what im doing but Nothings working??? is there a bug in my installation or something on all my servers?

Am i just doing the code wrong?
smooch1502
Posts: 87
Joined: 07 Aug 2009, 11:01

Postby smooch1502 » 08 Sep 2009, 08:07

:( its just not working?
smooch1502
Posts: 87
Joined: 07 Aug 2009, 11:01

Postby smooch1502 » 11 Sep 2009, 13:36

No one can help?
:(

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 93 guests