diff options
author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-26 13:28:35 +0000 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2006-08-26 13:28:35 +0000 |
commit | 5cc5c903df7b535c6bf27987b89a405812d89735 (patch) | |
tree | f6055dd2a3beb0ba4c057ed591d18b0441141b04 /src/gui/chat.cpp | |
parent | 15b008dd95252fea93d84d5bfbfa3862c267c50e (diff) | |
download | mana-5cc5c903df7b535c6bf27987b89a405812d89735.tar.gz mana-5cc5c903df7b535c6bf27987b89a405812d89735.tar.bz2 mana-5cc5c903df7b535c6bf27987b89a405812d89735.tar.xz mana-5cc5c903df7b535c6bf27987b89a405812d89735.zip |
Implemented "say around" chat.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 592439fc..e8bb1cc6 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -37,6 +37,7 @@ #include "../localplayer.h" #include "../net/messageout.h" +#include "../net/network.h" #include "../net/protocol.h" ChatWindow::ChatWindow(Network *network): @@ -249,12 +250,10 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) // Prepare ordinary message if (msg.substr(0, 1) != "/") { - msg = nick + " : " + msg; - MessageOut outMsg; - outMsg.writeShort(CMSG_CHAT_MESSAGE); - outMsg.writeShort(msg.length() + 4); - outMsg.writeString(msg, msg.length()); + outMsg.writeShort(PGMSG_SAY); + outMsg.writeString(msg); + network->send(Network::GAME, outMsg); } else if (msg.substr(0, IS_ANNOUNCE_LENGTH) == IS_ANNOUNCE) { |