diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-25 18:04:38 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-07-25 18:04:38 +0000 |
commit | c7e7b62aa94bf295ca1dc556762ad6070221e0cd (patch) | |
tree | 04f827df0df64a80e04a4115986609486d715237 /src/gui/chat.cpp | |
parent | c0c8775271679ac4904bc0bc02a74d28fc75efd0 (diff) | |
download | mana-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.tar.gz mana-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.tar.bz2 mana-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.tar.xz mana-c7e7b62aa94bf295ca1dc556762ad6070221e0cd.zip |
Switched client to use enet and modified login sequence to work with the new protocol from tmwserv.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 64b56caf..870582df 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -261,9 +261,9 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) if (msg.substr(0, IS_ANNOUNCE_LENGTH) == IS_ANNOUNCE) { msg.erase(0, IS_ANNOUNCE_LENGTH); - MessageOut outMsg(mNetwork); - outMsg.writeInt16(0x0099); - outMsg.writeInt16(msg.length() + 4); + MessageOut outMsg; + outMsg.writeShort(0x0099); + outMsg.writeShort(msg.length() + 4); outMsg.writeString(msg, msg.length()); } else if (msg.substr(0, IS_HELP_LENGTH) == IS_HELP) @@ -280,8 +280,8 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) } else if (msg.substr(0, IS_WHO_LENGTH) == IS_WHO) { - MessageOut outMsg(mNetwork); - outMsg.writeInt16(0x00c1); + MessageOut outMsg; + outMsg.writeShort(0x00c1); } else { @@ -292,9 +292,9 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) else { msg = nick + " : " + msg; - MessageOut outMsg(mNetwork); - outMsg.writeInt16(CMSG_CHAT_MESSAGE); - outMsg.writeInt16(msg.length() + 4); + MessageOut outMsg; + outMsg.writeShort(CMSG_CHAT_MESSAGE); + outMsg.writeShort(msg.length() + 4); outMsg.writeString(msg, msg.length()); } } |