diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-04-01 14:13:11 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-04-01 14:13:11 -0600 |
commit | b987a2806dbcd87a23850901f6f0b86f0801086c (patch) | |
tree | e373f4869436f830c2cdeeeaf34a941560ded3fe /src/commandhandler.cpp | |
parent | 6ef22b50f3d0c2410af5bd2543bedc0b3d692f83 (diff) | |
download | mana-client-b987a2806dbcd87a23850901f6f0b86f0801086c.tar.gz mana-client-b987a2806dbcd87a23850901f6f0b86f0801086c.tar.bz2 mana-client-b987a2806dbcd87a23850901f6f0b86f0801086c.tar.xz mana-client-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/commandhandler.cpp')
-rw-r--r-- | src/commandhandler.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 63633693..03b192f9 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -30,12 +30,14 @@ #include "gui/widgets/chattab.h" #include "gui/chat.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/adminhandler.h" +#include "net/ea/chathandler.h" +#include "net/ea/maphandler.h" #endif #include "utils/gettext.h" @@ -133,12 +135,11 @@ void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) void CommandHandler::handleAnnounce(const std::string &args, ChatTab *tab) { + // Net::getAdminHandler()->announce(args); #ifdef TMWSERV_SUPPORT Net::ChatServer::announce(args); #else - MessageOut outMsg(0x0099); - outMsg.writeInt16(args.length() + 4); - outMsg.writeString(args, args.length()); + adminHandler->announce(args); #endif } @@ -318,10 +319,11 @@ void CommandHandler::handleWhere(const std::string &args, ChatTab *tab) void CommandHandler::handleWho(const std::string &args, ChatTab *tab) { + // Net::getMapHandler()->who(); #ifdef TMWSERV_SUPPORT //TODO #else - MessageOut outMsg(0x00c1); + mapHandler->who(); #endif } @@ -480,8 +482,12 @@ void CommandHandler::handleParty(const std::string &args, ChatTab *tab) void CommandHandler::handleMe(const std::string &args, ChatTab *tab) { - std::string action = strprintf("*%s*", args.c_str()); - chatWindow->chatInput(action); + // Net::getChatHandler()->me(args); +#ifdef TMWServ_SUPPORT + // TODO +#else + chatHandler->me(args); +#endif } void CommandHandler::handleRecord(const std::string &args, ChatTab *tab) |