diff options
Diffstat (limited to 'src/chat-server/chathandler.hpp')
-rw-r--r-- | src/chat-server/chathandler.hpp | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/src/chat-server/chathandler.hpp b/src/chat-server/chathandler.hpp index 1b44772d..30f83b94 100644 --- a/src/chat-server/chathandler.hpp +++ b/src/chat-server/chathandler.hpp @@ -51,6 +51,11 @@ class ChatHandler : public ConnectionHandler std::string character; unsigned char level; }; + + /** + * Map the chat clients to the characters name + */ + std::map<std::string, ChatClient*> mPlayerMap; public: @@ -72,20 +77,6 @@ class ChatHandler : public ConnectionHandler char eventId); /** - * Send chat and guild info to chat client, so that they can join the - * correct channels. - */ - void sendGuildEnterChannel(const MessageOut &msg, - const std::string &name); - - /** - * Send guild invite. - */ - void sendGuildInvite(const std::string &invitedName, - const std::string &inviterName, - const std::string &guildName); - - /** * Called by TokenCollector when a client wrongly connected. */ void deletePendingClient(ChatClient *); @@ -120,6 +111,20 @@ class ChatHandler : public ConnectionHandler * Send messages for each guild the character belongs to. */ void sendGuildRejoin(ChatClient &computer); + + /** + * Send chat and guild info to chat client, so that they can join the + * correct channels. + */ + void sendGuildEnterChannel(const MessageOut &msg, + const std::string &name); + + /** + * Send guild invite. + */ + void sendGuildInvite(const std::string &invitedName, + const std::string &inviterName, + const std::string &guildName); private: /** @@ -156,6 +161,21 @@ class ChatHandler : public ConnectionHandler void handleDisconnectMessage(ChatClient &client, MessageIn &msg); + + void + handleGuildCreation(ChatClient &client, MessageIn &msg); + + void + handleGuildInvitation(ChatClient &client, MessageIn &msg); + + void + handleGuildAcceptInvite(ChatClient &client, MessageIn &msg); + + void + handleGuildRetrieveMembers(ChatClient &client, MessageIn &msg); + + void + handleGuildQuit(ChatClient &client, MessageIn &msg); /** * Tell the player to be more polite. |