Class: ChatMessageHandler

ChatMessageHandler()

The purpose of this class is to run a given chat message through parsers until one of them succeeds and then call all callback handlers on the result.

Constructor

new ChatMessageHandler()

Source:

Members

messageFormats

Each property is an array of messageformat class instances. The classes must have a parse function that receives a msg object and translates into a string.
Source:

messageHandlers

Functions that are called each time a message was parsed.
Source:

Methods

registerMessageFormat(type, handler)

Parameters:
Name Type Description
type a string denoting the messagetype used by addChatMessage calls.
handler a class instance with a parse function.
Source:

registerMessageFormatClass()

Receives a class where each enumerable owned property is a chat format class identified by the property name.
Source: