sendModeratorMessage()
Availability:
SmartFoxServer Basic / Pro (version 1.4.5+)
Usage:
smartFox.sendModeratorMessage(msg <String>, type <integer>, id <integer>)
Description:
Sends a moderator message to an entire Zone, a Room or a single User.
Parameters:
msg | The message | |
type | You can use the following constants (see example below): MODMSG_TO_ZONE MODMSG_TO_ROOM MODMSG_TO_USER |
|
id | the id of the recipient Room or User, ignored if you're sending the message to a Zone |
Returns:
Fires the onPublicMessage event
Example:
-- Send message to all the clients in the currently active room smartFox.sendModeratorMessage("Greetings from the moderator", smartFox.MODMSG_TO_ROOM, smartFox.getActiveRoom()[#id])
See also:
onModeratorMessage(), onAdminMessage()