myworld.channels
This module exposes channel communications to scripts. Channels are used for chat, and may in the future be used for script-script communication as well. Messages are sent on named channels, and are received by listeners registered to those channels.
Note that scripts currently can send to channels, but currently cannot receive from them.
Variables
MAIN_CHANNEL- the main channel name. Contains the valuemain.
Methods
send(channel, msg)- sends a message on the given channelchannel- String, the channel namemsg- Object, the message to send
say(msg)- sends a message on the main channelmsg- Object, the message to send