ChatLineBuffer

Group
player
Methods
3
Fields
None

Methods

MethodReturnsDescription
getLines(){MessageNode}The lines, newest first. A buffer has 100 slots; this array holds only the getLength() lines in use, and lines[k] past them is nil (`…
getLength()numberHow many lines it holds.
removeMessageNode(MessageNode)()Take node out of this buffer: the lines after it move down one, the buffer is one shorter, and the message leaves client:getMessages()…

Returned by

MethodReturnsDescription
Client.getChatLineMap{[number]: ChatLineBuffer}The chatbox's line buffers, by chat type.

Method details

getLines

getLines: (ChatLineBuffer) -> {MessageNode}

The lines, newest first. A buffer has 100 slots; this array holds only the getLength() lines in use, and lines[k] past them is nil (#lines is getLength(), not 100). Lua arrays start at 1: the newest line is getLines()[1].

removeMessageNode

removeMessageNode: (ChatLineBuffer, MessageNode) -> ()

Take node out of this buffer: the lines after it move down one, the buffer is one shorter, and the message leaves client:getMessages() (the "All" tab too). The chatbox shows it once it rebuilds (client:refreshChat(), or the build script). A node that is not one of this buffer's lines (another type's, or one already gone) changes nothing. The removed node answers as a dropped message does: its id and type, an empty name and value. An error on a client whose table does not place it.