summaryrefslogtreecommitdiff
path: root/src/chat-server/chathandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-04 21:52:17 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-02-04 21:52:17 +0000
commitcade1ba618bd1883e044999a0cbda201f1f76dd4 (patch)
tree978d8e0d97b0f5b0eec3a77a8d25e54b870ed786 /src/chat-server/chathandler.cpp
parent9c0421f5926d22a44c978fff683c51748a19e976 (diff)
downloadmanaserv-cade1ba618bd1883e044999a0cbda201f1f76dd4.tar.gz
manaserv-cade1ba618bd1883e044999a0cbda201f1f76dd4.tar.bz2
manaserv-cade1ba618bd1883e044999a0cbda201f1f76dd4.tar.xz
manaserv-cade1ba618bd1883e044999a0cbda201f1f76dd4.zip
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).
Diffstat (limited to 'src/chat-server/chathandler.cpp')
-rw-r--r--src/chat-server/chathandler.cpp18
1 files changed, 12 insertions, 6 deletions
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);