Planeshift
Public Member Functions | Public Attributes

psChatMessage Class Reference

Message sent with chat info. More...

#include <messages.h>

List of all members.

Public Member Functions

const char * GetTypeText ()
 Translate type code into words.
 psChatMessage (MsgEntry *message)
 This constructor receives a PS Message struct and cracks it apart to provide more easily usable fields.
 psChatMessage (uint32_t cnum, EID actorid, const char *person, const char *other, const char *chatMessage, uint8_t type, bool translate, uint16_t channelID=0)
 This function creates a PS Message struct given a chat text to send out.
 PSF_DECLARE_MSG_FACTORY ()
virtual csString ToString (NetBase::AccessPointers *accessPointers)
 Converts the message into human readable string.

Public Attributes

EID actor
 Keeps the eid of the originator client for chat bubbles.
uint16_t channelID
uint8_t iChatType
 type of message this is
csString sOther
 Name of the other person involved in this chat message (used only with some chat types)
csString sPerson
 name of person this chat message comes from
csString sText
 the text the message contains
bool translate
 is the text supposed to be translated by psLocalization on target client ?

Detailed Description

Message sent with chat info.

Definition at line 808 of file messages.h.


Constructor & Destructor Documentation

psChatMessage::psChatMessage ( uint32_t  cnum,
EID  actorid,
const char *  person,
const char *  other,
const char *  chatMessage,
uint8_t  type,
bool  translate,
uint16_t  channelID = 0 
)

This function creates a PS Message struct given a chat text to send out.

This would be used for outgoing, new message creation

psChatMessage::psChatMessage ( MsgEntry message)

This constructor receives a PS Message struct and cracks it apart to provide more easily usable fields.

It is intended for use on incoming messages.


Member Function Documentation

const char* psChatMessage::GetTypeText ( )

Translate type code into words.

Could be multilingual in future.

psChatMessage::PSF_DECLARE_MSG_FACTORY ( )
virtual csString psChatMessage::ToString ( NetBase::AccessPointers accessPointers) [virtual]

Converts the message into human readable string.

Parameters:
accessPointersA struct to a number of access pointers.
Returns:
Return a human readable string for the message.

Implements psMessageCracker.


Member Data Documentation

Keeps the eid of the originator client for chat bubbles.

Definition at line 833 of file messages.h.

Definition at line 835 of file messages.h.

type of message this is

Definition at line 812 of file messages.h.

Name of the other person involved in this chat message (used only with some chat types)

This string is included in the net message only when needed and currently only the CHAT_ADVISOR message type uses it. Modify both constructors if you want to use it with other chat message types.

Definition at line 824 of file messages.h.

name of person this chat message comes from

Definition at line 815 of file messages.h.

the text the message contains

Definition at line 827 of file messages.h.

is the text supposed to be translated by psLocalization on target client ?

Definition at line 830 of file messages.h.


The documentation for this class was generated from the following file: