Home Reference Source
public class | source

ChatClient

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public

commands: {}

public

player: *

public

team: *

Method Summary

Public Methods
public

addChatAnnouncement(message: string, sendingTeam: string)

Chat box implementation for event announcements (capturing, etc)

public

addChatLine(name: string, message: string, me: boolean, sendingTeam: string)

Chat box implementation for the users.

public

addLoginMessage(name: *, me: *)

public

addPrivateMessage(name: string, message: string, me: boolean)

Chat box implementation for the users.

public

addSystemLine(message: *)

public

appendMessage(innerHTML: string, color: string)

Places the message DOM node into the chat box.

public
public

registerCommand(name: *, description: *, callback: *)

public

Defines all commands and their behaviors.

public

sendChat(key: *)

Public Constructors

public constructor() source

Public Members

public commandPrefix: string source

public commands: {} source

public player: * source

public team: * source

Public Methods

public addChatAnnouncement(message: string, sendingTeam: string) source

Chat box implementation for event announcements (capturing, etc)

Params:

NameTypeAttributeDescription
message string

What message was sent

sendingTeam string

Subject of the message.

public addChatLine(name: string, message: string, me: boolean, sendingTeam: string) source

Chat box implementation for the users.

Params:

NameTypeAttributeDescription
name string

Name of the player who sent the message

message string

Message that was sent

me boolean

True if the sender matches the receiver

sendingTeam string

The name of the team that sent this message

public addLoginMessage(name: *, me: *) source

Params:

NameTypeAttributeDescription
name *
me *

public addPrivateMessage(name: string, message: string, me: boolean) source

Chat box implementation for the users.

Params:

NameTypeAttributeDescription
name string

Name of the player who sent the message

message string

Message that was sent

me boolean

True if the sender matches the receiver

public addSystemLine(message: *) source

Params:

NameTypeAttributeDescription
message *

public appendMessage(innerHTML: string, color: string) source

Places the message DOM node into the chat box.

Params:

NameTypeAttributeDescription
innerHTML string

The message to be displayed.

color string

How the message should be styled - see main.css for styles and to create more styles.

public printHelp() source

public registerCommand(name: *, description: *, callback: *) source

Params:

NameTypeAttributeDescription
name *
description *
callback *

public registerFunctions() source

Defines all commands and their behaviors.

public sendChat(key: *) source

Params:

NameTypeAttributeDescription
key *