Planeshift
psCharRejectedMessage Class Reference

Opposite of psCharApprovedMessage. More...

#include <charmessages.h>

Public Types

enum  ErrorTypes {
  UNKNOWN, NON_LEGAL_NAME, NON_UNIQUE_NAME, RESERVED_NAME,
  INVALID_CREATION, FAILED_ACCOUNT
}
 Possible Character Rejection Reasons. More...
 

Public Member Functions

 psCharRejectedMessage (uint32_t clientnum, int type=UNKNOWN, const char *msg="Unknown error")
 Constructed on server for the client. More...
 
 psCharRejectedMessage (MsgEntry *msg)
 Constructed on client to crack message. More...
 
 PSF_DECLARE_MSG_FACTORY ()
 
virtual csString ToString (NetBase::AccessPointers *accessPointers)
 Convert the message into human readable string. More...
 
- Public Member Functions inherited from psMessageCracker
void FireEvent ()
 Publishes the message to the local program. More...
 
virtual csString GetMessageTypeName () const =0
 Gets the name of the message type. More...
 
void Multicast (csArray< PublishDestination > &multi, uint32_t except, float range)
 Multicasts the message to all current connections. More...
 
 psMessageCracker ()
 
void SendMessage ()
 Sends the message to the client/server. More...
 
virtual ~psMessageCracker ()
 

Public Attributes

csString errorMesg
 Holds error message from the server. More...
 
int errorType
 The error type ( from enum ) More...
 
- Public Attributes inherited from psMessageCracker
int filterNumber
 
csRef< MsgEntrymsg
 
bool valid
 

Additional Inherited Members

- Static Public Attributes inherited from psMessageCracker
static MsgHandlermsghandler
 

Detailed Description

Opposite of psCharApprovedMessage.

Hands back a type and error message for the client to display.

Definition at line 73 of file charmessages.h.

Member Enumeration Documentation

Possible Character Rejection Reasons.

Enumerator
UNKNOWN 
NON_LEGAL_NAME 
NON_UNIQUE_NAME 
RESERVED_NAME 
INVALID_CREATION 
FAILED_ACCOUNT 

Definition at line 77 of file charmessages.h.

Constructor & Destructor Documentation

psCharRejectedMessage::psCharRejectedMessage ( uint32_t  clientnum,
int  type = UNKNOWN,
const char *  msg = "Unknown error" 
)

Constructed on server for the client.

psCharRejectedMessage::psCharRejectedMessage ( MsgEntry msg)

Constructed on client to crack message.

Member Function Documentation

psCharRejectedMessage::PSF_DECLARE_MSG_FACTORY ( )
virtual csString psCharRejectedMessage::ToString ( NetBase::AccessPointers accessPointers)
virtual

Convert 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

csString psCharRejectedMessage::errorMesg

Holds error message from the server.

Definition at line 107 of file charmessages.h.

int psCharRejectedMessage::errorType

The error type ( from enum )

Definition at line 104 of file charmessages.h.


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