summaryrefslogtreecommitdiff
path: root/src/gui/widgets/chattab.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-04-01 14:13:11 -0600
committerJared Adams <jaxad0127@gmail.com>2009-04-01 14:13:11 -0600
commitb987a2806dbcd87a23850901f6f0b86f0801086c (patch)
treee373f4869436f830c2cdeeeaf34a941560ded3fe /src/gui/widgets/chattab.cpp
parent6ef22b50f3d0c2410af5bd2543bedc0b3d692f83 (diff)
downloadmana-b987a2806dbcd87a23850901f6f0b86f0801086c.tar.gz
mana-b987a2806dbcd87a23850901f6f0b86f0801086c.tar.bz2
mana-b987a2806dbcd87a23850901f6f0b86f0801086c.tar.xz
mana-b987a2806dbcd87a23850901f6f0b86f0801086c.zip
Create a few more handlers for eAthena
Map, chat, and admin have been finished (to the degree they handle all existing cases).
Diffstat (limited to 'src/gui/widgets/chattab.cpp')
-rw-r--r--src/gui/widgets/chattab.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp
index 43248e8b..bd0504b5 100644
--- a/src/gui/widgets/chattab.cpp
+++ b/src/gui/widgets/chattab.cpp
@@ -30,12 +30,12 @@
#include "gui/recorder.h"
#include "gui/scrollarea.h"
+#include "net/net.h"
#ifdef TMWSERV_SUPPORT
#include "net/tmwserv/chatserver/chatserver.h"
#include "net/tmwserv/gameserver/player.h"
#else
-#include "net/messageout.h"
-#include "net/ea/protocol.h"
+#include "net/ea/chathandler.h"
#endif
#include "resources/iteminfo.h"
@@ -276,16 +276,11 @@ void ChatTab::clearText()
}
void ChatTab::handleInput(const std::string &msg) {
+ // Net::getChatHandler()->talk(msg);
#ifdef TMWSERV_SUPPORT
Net::GameServer::Player::say(msg);
#else
- std::string mes = player_node->getName() + " : " + msg;
-
- MessageOut outMsg(CMSG_CHAT_MESSAGE);
- // Added + 1 in order to let eAthena parse admin commands correctly
- outMsg.writeInt16(mes.length() + 4 + 1);
- outMsg.writeString(mes, mes.length() + 1);
- return;
+ chatHandler->talk(msg);
#endif
}