summaryrefslogtreecommitdiff
path: root/src/net/chathandler.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-21 16:30:11 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-11-21 16:30:11 +0000
commita5e6a44b51d4269ed6812c9a9e0b6a293d959a4d (patch)
treef269a803b58b47082156dc74bb0d6e8e2dc6519e /src/net/chathandler.cpp
parent1f6975d34e2c6fe8404fcbe13da406e624d94b68 (diff)
downloadmana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.gz
mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.bz2
mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.tar.xz
mana-a5e6a44b51d4269ed6812c9a9e0b6a293d959a4d.zip
Renamed {read,write}{Byte,Short,Long} to {read,write}{Int8,Int16,Int32}. This
is less confusing in 64-bit context and less conflicting with the 0.0 client.
Diffstat (limited to 'src/net/chathandler.cpp')
-rw-r--r--src/net/chathandler.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp
index 713b8f22..9fe231e6 100644
--- a/src/net/chathandler.cpp
+++ b/src/net/chathandler.cpp
@@ -73,7 +73,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
switch (msg.getId())
{
case GPMSG_SAY:
- being = beingManager->findBeing(msg.readShort());
+ being = beingManager->findBeing(msg.readInt16());
chatMsg = msg.readString();
if (being)
{
@@ -86,9 +86,9 @@ void ChatHandler::handleMessage(MessageIn &msg)
}
break;
case CPMSG_REGISTER_CHANNEL_RESPONSE:
- if(msg.readByte() == ERRMSG_OK)
+ if(msg.readInt8() == ERRMSG_OK)
{
- channelId = msg.readShort();
+ channelId = msg.readInt16();
std::string channelName = msg.readString();
chatWindow->chatLog("Registered Channel " + channelName, BY_SERVER);
chatWindow->addChannel(channelId, channelName);
@@ -100,9 +100,9 @@ void ChatHandler::handleMessage(MessageIn &msg)
}
break;
case CPMSG_ENTER_CHANNEL_RESPONSE:
- if(msg.readByte() == ERRMSG_OK)
+ if(msg.readInt8() == ERRMSG_OK)
{
- channelId = msg.readShort();
+ channelId = msg.readInt16();
channelName = msg.readString();
std::string announcement = msg.readString();
std::vector<std::string> userList;
@@ -126,7 +126,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
{
channelName = msg.readString();
std::ostringstream numUsers;
- numUsers << msg.readShort();
+ numUsers << msg.readInt16();
if(channelName != "")
{
channelName += " - ";
@@ -138,7 +138,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
break;
case CPMSG_PUBMSG:
- channelId = msg.readShort();
+ channelId = msg.readInt16();
userNick = msg.readString();
chatMsg = msg.readString();
@@ -146,9 +146,9 @@ void ChatHandler::handleMessage(MessageIn &msg)
break;
case CPMSG_QUIT_CHANNEL_RESPONSE:
- if(msg.readByte() == ERRMSG_OK)
+ if(msg.readInt8() == ERRMSG_OK)
{
- channelId = msg.readShort();
+ channelId = msg.readInt16();
// remove the chat tab
chatWindow->removeChannel(channelId);
}
@@ -156,8 +156,8 @@ void ChatHandler::handleMessage(MessageIn &msg)
/*
// Received speech from being
case SMSG_BEING_CHAT:
- chatMsgLength = msg.readShort() - 8;
- being = beingManager->findBeing(msg.readLong());
+ chatMsgLength = msg.readInt16() - 8;
+ being = beingManager->findBeing(msg.readInt32());
if (!being || chatMsgLength <= 0)
{
@@ -173,7 +173,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
case SMSG_PLAYER_CHAT:
case SMSG_GM_CHAT:
- chatMsgLength = msg.readShort() - 4;
+ chatMsgLength = msg.readInt16() - 4;
if (chatMsgLength <= 0)
{
@@ -200,13 +200,13 @@ void ChatHandler::handleMessage(MessageIn &msg)
break;
case SMSG_WHO_ANSWER:
- chatWindow->chatLog("Online users: " + toString(msg.readLong()),
+ chatWindow->chatLog("Online users: " + toString(msg.readInt32()),
BY_SERVER);
break;
case 0x010c:
// Display MVP player
- msg.readLong(); // id
+ msg.readInt32(); // id
chatWindow->chatLog("MVP player", BY_SERVER);
break;
*/