diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-26 22:09:04 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2006-08-26 22:09:04 +0000 |
commit | 40339bebb026cd553aacbbff6f2fe1aa14816d5a (patch) | |
tree | f6398430043accbc90170ac15c62c8deebd895eb /src/gui/chat.cpp | |
parent | fd279ae77295a6babedd31202078862eabcada9f (diff) | |
download | mana-client-40339bebb026cd553aacbbff6f2fe1aa14816d5a.tar.gz mana-client-40339bebb026cd553aacbbff6f2fe1aa14816d5a.tar.bz2 mana-client-40339bebb026cd553aacbbff6f2fe1aa14816d5a.tar.xz mana-client-40339bebb026cd553aacbbff6f2fe1aa14816d5a.zip |
Got rid of the default MessageOut constructor, since all messages should have
an ID.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 04ac3996..9098f9f0 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -249,16 +249,14 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) // Prepare ordinary message if (msg.substr(0, 1) != "/") { - MessageOut outMsg; - outMsg.writeShort(PGMSG_SAY); + MessageOut outMsg(PGMSG_SAY); outMsg.writeString(msg); Network::send(Network::GAME, outMsg); } else if (msg.substr(0, IS_ANNOUNCE_LENGTH) == IS_ANNOUNCE) { msg.erase(0, IS_ANNOUNCE_LENGTH); - MessageOut outMsg; - outMsg.writeShort(0x0099); + MessageOut outMsg(0x0099); outMsg.writeShort(msg.length() + 4); outMsg.writeString(msg, msg.length()); } @@ -276,8 +274,7 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) } else if (msg.substr(0, IS_WHO_LENGTH) == IS_WHO) { - MessageOut outMsg; - outMsg.writeShort(0x00c1); + MessageOut outMsg(0x00c1); } else { |