summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-26 13:28:35 +0000
committerGuillaume Melquiond <guillaume.melquiond@gmail.com>2006-08-26 13:28:35 +0000
commit5cc5c903df7b535c6bf27987b89a405812d89735 (patch)
treef6055dd2a3beb0ba4c057ed591d18b0441141b04 /src/gui
parent15b008dd95252fea93d84d5bfbfa3862c267c50e (diff)
downloadmana-client-5cc5c903df7b535c6bf27987b89a405812d89735.tar.gz
mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.tar.bz2
mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.tar.xz
mana-client-5cc5c903df7b535c6bf27987b89a405812d89735.zip
Implemented "say around" chat.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/chat.cpp9
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)
{