diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-13 22:56:29 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-09-13 22:56:29 +0000 |
commit | 3dc311a652d1fda1252903a974920395e56e5668 (patch) | |
tree | 7098d55015d28a4d973c5073d7c9e45ae03ec400 /src/gui/chat.cpp | |
parent | 78771718bf7af14273d7bb0090dccff97b00b397 (diff) | |
download | mana-client-3dc311a652d1fda1252903a974920395e56e5668.tar.gz mana-client-3dc311a652d1fda1252903a974920395e56e5668.tar.bz2 mana-client-3dc311a652d1fda1252903a974920395e56e5668.tar.xz mana-client-3dc311a652d1fda1252903a974920395e56e5668.zip |
Merged with SDL_NET_TEST branch.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 72de3c83..e6dabaaa 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -169,7 +169,7 @@ void ChatWindow::action(const std::string& eventId) curHist = history.end(); // Send the message to the server - chat_send(char_info[0].name, message.c_str()); + chat_send(player_info->name.c_str(), message.c_str()); // Clear the text from the chat input chatInput->setText(""); @@ -217,10 +217,10 @@ char *ChatWindow::chat_send(std::string nick, std::string msg) msg += "\0"; // send processed message - WFIFOW(0) = net_w_value(packid); - WFIFOW(2) = net_w_value((unsigned short)(msg.length()+4)); - memcpy(WFIFOP(4), msg.c_str(), msg.length()); - WFIFOSET((int)msg.length()+4); + writeWord(0, packid); + writeWord(2, (unsigned short)(msg.length() + 4)); + memcpy(writePointer(4), msg.c_str(), msg.length()); + writeSet((int)msg.length()+4); nick = msg = ""; return ""; } |