diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-11-02 12:43:49 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2006-11-02 12:43:49 +0000 |
commit | 5f0ebee0d4d75fa91d417f4f352abdbc7502c2f0 (patch) | |
tree | b030f9ff00fceb9f90fab2c9fd56bdc16cd4126c /src/gui/chat.cpp | |
parent | fa035c2fd70945a0b12143ce9b81284d8d24d13b (diff) | |
download | mana-5f0ebee0d4d75fa91d417f4f352abdbc7502c2f0.tar.gz mana-5f0ebee0d4d75fa91d417f4f352abdbc7502c2f0.tar.bz2 mana-5f0ebee0d4d75fa91d417f4f352abdbc7502c2f0.tar.xz mana-5f0ebee0d4d75fa91d417f4f352abdbc7502c2f0.zip |
Network layer refactoring.
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r-- | src/gui/chat.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp index 9a5d60b0..3dc252ab 100644 --- a/src/gui/chat.cpp +++ b/src/gui/chat.cpp @@ -36,9 +36,9 @@ #include "../game.h" #include "../localplayer.h" -#include "../net/messageout.h" -#include "../net/network.h" -#include "../net/protocol.h" +#include "../net/chatserver/chatserver.h" + +#include "../net/gameserver/player.h" ChatWindow::ChatWindow(): Window(""), @@ -249,16 +249,12 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) // Prepare ordinary message if (msg.substr(0, 1) != "/") { - MessageOut outMsg(PGMSG_SAY); - outMsg.writeString(msg); - Network::send(Network::GAME, outMsg); + Net::GameServer::Player::say(msg); } else if (msg.substr(0, IS_ANNOUNCE_LENGTH) == IS_ANNOUNCE) { msg.erase(0, IS_ANNOUNCE_LENGTH); - MessageOut outMsg(0x0099); - outMsg.writeShort(msg.length() + 4); - outMsg.writeString(msg, msg.length()); + Net::ChatServer::announce(msg); } else if (msg.substr(0, IS_HELP_LENGTH) == IS_HELP) { @@ -274,7 +270,10 @@ ChatWindow::chatSend(const std::string &nick, std::string msg) } else if (msg.substr(0, IS_WHO_LENGTH) == IS_WHO) { + // XXX Convert for new server + /* MessageOut outMsg(0x00c1); + */ } else { |