diff options
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/channeltab.cpp | 12 | ||||
-rw-r--r-- | src/gui/widgets/chattab.cpp | 14 | ||||
-rw-r--r-- | src/gui/widgets/whispertab.cpp | 13 |
3 files changed, 7 insertions, 32 deletions
diff --git a/src/gui/widgets/channeltab.cpp b/src/gui/widgets/channeltab.cpp index 6425293c..edc0473c 100644 --- a/src/gui/widgets/channeltab.cpp +++ b/src/gui/widgets/channeltab.cpp @@ -23,12 +23,8 @@ #include "channel.h" -#ifdef TMWSERV_SUPPORT -#include "net/tmwserv/chatserver/chatserver.h" -#include "net/tmwserv/gameserver/player.h" -#else - -#endif +#include "net/chathandler.h" +#include "net/net.h" ChannelTab::ChannelTab(Channel *channel) : ChatTab(channel->getName()), mChannel(channel) @@ -41,7 +37,5 @@ ChannelTab::~ChannelTab() } void ChannelTab::handleInput(const std::string &msg) { -#ifdef TMSERV_SUPPORT - Net::ChatServer::chat(getId(), msg); -#endif + Net::getChatHandler()->sendToChannel(getChannel()->getId(), msg); } diff --git a/src/gui/widgets/chattab.cpp b/src/gui/widgets/chattab.cpp index bd0504b5..88d62076 100644 --- a/src/gui/widgets/chattab.cpp +++ b/src/gui/widgets/chattab.cpp @@ -30,13 +30,8 @@ #include "gui/recorder.h" #include "gui/scrollarea.h" +#include "net/chathandler.h" #include "net/net.h" -#ifdef TMWSERV_SUPPORT -#include "net/tmwserv/chatserver/chatserver.h" -#include "net/tmwserv/gameserver/player.h" -#else -#include "net/ea/chathandler.h" -#endif #include "resources/iteminfo.h" #include "resources/itemdb.h" @@ -276,12 +271,7 @@ void ChatTab::clearText() } void ChatTab::handleInput(const std::string &msg) { - // Net::getChatHandler()->talk(msg); -#ifdef TMWSERV_SUPPORT - Net::GameServer::Player::say(msg); -#else - chatHandler->talk(msg); -#endif + Net::getChatHandler()->talk(msg); } void ChatTab::handleCommand(std::string msg) diff --git a/src/gui/widgets/whispertab.cpp b/src/gui/widgets/whispertab.cpp index a641f0ad..d69a495c 100644 --- a/src/gui/widgets/whispertab.cpp +++ b/src/gui/widgets/whispertab.cpp @@ -25,12 +25,8 @@ #include "gui/palette.h" +#include "net/chathandler.h" #include "net/net.h" -#ifdef TMWSERV_SUPPORT -#include "net/tmwserv/chatserver/chatserver.h" -#else -#include "net/ea/chathandler.h" -#endif #include "utils/gettext.h" #include "utils/strprintf.h" @@ -53,12 +49,7 @@ void WhisperTab::handleInput(const std::string &msg) { return; } - // Net::getChatHandler()->privateMessage(mNick, msg); -#ifdef TMWSERV_SUPPORT - Net::ChatServer::privMsg(mNick, msg); -#else - chatHandler->privateMessage(mNick, msg); -#endif + Net::getChatHandler()->privateMessage(mNick, msg); chatLog(strprintf(_("%s: %s"), player_node->getName().c_str(), msg.c_str()), BY_PLAYER, false); |