isModerator()

Availability:

SmartFoxServer Basic / Pro

Usage:

user.isModerator()

Description:

Returns True if the client is a moderator.
This allows the client to send kick and ban requests to the server.

Parameters:

none   none

Returns:

A boolean, true = is a moderator

Example:

isMod = user.isModerator()

if (isMod) then 
	//... do something cool here ...
end if

The following code shows how to use the moderator "super powers":

data=[#id:3, #message:"You are banned"]

smartFox.sendXtMessage("$dmn", "kick", data)

The params are:

"$dmn" : this is the name of the admin extension, never change it
"kick
": is the command you want to invoke ("ban" is also available)
dataObj: an object with the userId (as a string) and the mod message

If you substitute "kick" with "ban" you will banish the user from the server.

See also:

login(), onLogin()