chatentry

This control defines the main chat entry control. The recommended location for it is in a desktop panel. Only one instance of the control can exist, attempts to create more than one will fail.

Slash commands, i.e. chat entries that start with the "/" character and a single command word immediately following, can be registered for special handling. Slash command handlers will receive one parameter, a string containing the remainder of the chat line following the command that can be used to issue parameters. Built in slash commands will precede any handlers defined.

See Comm package for details on the chat message structure.
Definition

<chatentry > <chatwindow > ... </chatwindow> <state > <position > ... </position> <speak > ... </speak> <story > ... </story> <action > ... </action> <emote > ... </emote> <ooc > ... </ooc> </state> </chatentry>

<chatentry >

 

<chatwindow > ... </chatwindow>

The name of the chatwindow receiving messages from this element

<state >

Details for the chat state indicator

<position > ... </position>

The position of the indicator relative to the application window

<speak > ... </speak>

The icon used for speak messages

<story > ... </story>

The icon used for story messages

<action > ... </action>

The icon used for action messages

<emote > ... </emote>

The icon used for emote messages

<ooc > ... </ooc>

The icon used for ooc messages

</state>

 

</chatentry>

 

Events

onDeliverMessage

function onDeliverMessage(messagedata, mode)

If present, this function is called whenever a message is originated by the local application using the delivery system (i.e. input from this control, standard chat window interactions (text, dice, chat output, etc.), or those added by chatwindow.deliverMessage or Comm.deliverChatMessage APIs). The following messages will not trigger this event: application system messages, or those added by chatwindow.addMessage or Comm.addChatMessage APIs.

Parameters

messagedata   (table)   
A table containing information about the message. See the chatentry description for details.

mode   (string)   
Specifies the mode used to send the message. One of the values "chat", "ooc", "act", "emote" or "story".

Return values

(...)
A boolean value of true indicates that the framework should process the message as is, false that the message should not be processed. A table value will be treated as the message data substituted in place of the data given as a parameter.

onSlashCommand

function onSlashCommand(command, parameterstring)

Called when the user submits chat messages starting with a slash ("/") character. Built in slash commands will precede any specified using this function.

Parameters

command   (string)   
The string containing the slash command, including the leading slash character.

parameterstring   (string)   
The unparsed string following the slash command, as present in the user input

Â