From cade1ba618bd1883e044999a0cbda201f1f76dd4 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 4 Feb 2007 21:52:17 +0000 Subject: Added support for switching character by reconnecting to the account server and fixed the issue where a client is not logged in after registering (patch by Rogier Polak). --- src/chat-server/chathandler.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/chat-server/chathandler.cpp') diff --git a/src/chat-server/chathandler.cpp b/src/chat-server/chathandler.cpp index 90193821..8269a6be 100644 --- a/src/chat-server/chathandler.cpp +++ b/src/chat-server/chathandler.cpp @@ -445,7 +445,8 @@ void ChatHandler::processMessage(NetComputer *comp, MessageIn &message) break; default: - LOG_WARN("Invalid message type"); + LOG_WARN("ChatHandler::processMessage, Invalid message type" + << message.getId()); result.writeShort(XXMSG_INVALID); break; } @@ -454,7 +455,8 @@ void ChatHandler::processMessage(NetComputer *comp, MessageIn &message) computer.send(result); } -void ChatHandler::handleCommand(ChatClient &computer, std::string const &command) +void +ChatHandler::handleCommand(ChatClient &computer, std::string const &command) { LOG_INFO("Chat: Received unhandled command: " << command); MessageOut result; @@ -463,7 +465,8 @@ void ChatHandler::handleCommand(ChatClient &computer, std::string const &command computer.send(result); } -void ChatHandler::warnPlayerAboutBadWords(ChatClient &computer) +void +ChatHandler::warnPlayerAboutBadWords(ChatClient &computer) { // We could later count if the player is really often unpolite. MessageOut result; @@ -474,7 +477,8 @@ void ChatHandler::warnPlayerAboutBadWords(ChatClient &computer) LOG_INFO(computer.characterName << " says bad words."); } -void ChatHandler::announce(ChatClient &computer, std::string const &text) +void +ChatHandler::announce(ChatClient &computer, std::string const &text) { MessageOut result; if (computer.accountLevel == AL_ADMIN || @@ -501,7 +505,8 @@ ChatHandler::sayToPlayer(ChatClient &computer, std::string const &playerName, std::string const &text) { MessageOut result; - LOG_DEBUG(computer.characterName << " says to " << playerName << ": " << text); + LOG_DEBUG(computer.characterName << " says to " << playerName << ": " + << text); // Send it to the being if the being exists result.writeShort(CPMSG_PRIVMSG); result.writeString(computer.characterName); @@ -521,7 +526,8 @@ ChatHandler::sayInChannel(ChatClient &computer, short channel, std::string const &text) { MessageOut result; - LOG_DEBUG(computer.characterName << " says in channel " << channel << ": " << text); + LOG_DEBUG(computer.characterName << " says in channel " << channel << ": " + << text); // Send it to every beings in channel result.writeShort(CPMSG_PUBMSG); result.writeShort(channel); -- cgit v1.2.3-60-g2f50