ChatHandler Class Reference

Manages chat related things like private messaging, chat channel handling as well as guild chat. More...

#include <chathandler.hpp>

Inheritance diagram for ChatHandler:

ConnectionHandler

List of all members.

Public Member Functions

bool startListen (enet_uint16 port)
 Start the handler.
void warnUsersAboutPlayerEventInChat (ChatChannel *channel, const std::string &info, char eventId)
 Tell a list of users about an event in a chatchannel.
void deletePendingClient (ChatClient *)
 Called by TokenCollector when a client wrongly connected.
void deletePendingConnect (Pending *)
 Called by TokenCollector when a client failed to connect.
void tokenMatched (ChatClient *, Pending *)
 Called by TokenCollector when a client succesfully connected.
void sendGuildListUpdate (const std::string &guildName, const std::string &characterName, char eventId)
 Send information about a change in the guild list to guild members.

Protected Member Functions

void processMessage (NetComputer *computer, MessageIn &message)
 Process chat related messages.
NetComputercomputerConnected (ENetPeer *)
 Returns a ChatClient instance.
void computerDisconnected (NetComputer *)
 Cleans up after the disconnected client.
void sendGuildRejoin (ChatClient &computer)
 Send messages for each guild the character belongs to.
void sendGuildEnterChannel (const MessageOut &msg, const std::string &name)
 Send chat and guild info to chat client, so that they can join the correct channels.
void sendGuildInvite (const std::string &invitedName, const std::string &inviterName, const std::string &guildName)
 Send guild invite.

Friends

void registerChatClient (const std::string &, const std::string &, int)
 Register future client attempt.

Classes

struct  PartyInvite
struct  Pending
 Data needed for initializing a ChatClient.


Detailed Description

Manages chat related things like private messaging, chat channel handling as well as guild chat.

The only form of chat not handled by this server is local chat, which is handled by the game server.

Todo:
b_lindeijer: Extend this class with handling of team chat once teams are implemented.

Definition at line 44 of file chathandler.hpp.


Member Function Documentation

void ChatHandler::warnUsersAboutPlayerEventInChat ( ChatChannel channel,
const std::string &  info,
char  eventId 
)

Tell a list of users about an event in a chatchannel.

Parameters:
channel the channel to send the message in, must not be NULL
info information pertaining to the event

Definition at line 699 of file chathandler.cpp.

References ChatChannel::getId(), MessageOut::writeByte(), MessageOut::writeShort(), and MessageOut::writeString().

Referenced by ChatChannelManager::removeUserFromAllChannels(), and ChatChannelManager::setChannelTopic().


Friends And Related Function Documentation

void registerChatClient ( const std::string &  ,
const std::string &  ,
int   
) [friend]

Register future client attempt.

Temporary until physical server split.

Definition at line 43 of file chathandler.cpp.


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

Generated on Sun Apr 26 17:30:46 2009 for TMW Server Collection by  doxygen 1.5.5