diff options
author | Chuck Miller <shadowmil@gmail.com> | 2010-08-01 18:00:41 -0400 |
---|---|---|
committer | Chuck Miller <shadowmil@gmail.com> | 2010-08-01 18:29:00 -0400 |
commit | 0e189bbe81c88283438aabb4fec3ba30920d3a36 (patch) | |
tree | c3f4b454564c6335c972fadd64fbc82cf23db55e /src/net/manaserv/chathandler.cpp | |
parent | 1937ef53c8dd42d986c0a6b061a482a6d8e3c0f7 (diff) | |
download | mana-0e189bbe81c88283438aabb4fec3ba30920d3a36.tar.gz mana-0e189bbe81c88283438aabb4fec3ba30920d3a36.tar.bz2 mana-0e189bbe81c88283438aabb4fec3ba30920d3a36.tar.xz mana-0e189bbe81c88283438aabb4fec3ba30920d3a36.zip |
Reduce localChatTab presence replacing it with the event system
Reviewed-By: Jared Adams
Diffstat (limited to 'src/net/manaserv/chathandler.cpp')
-rw-r--r-- | src/net/manaserv/chathandler.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/net/manaserv/chathandler.cpp b/src/net/manaserv/chathandler.cpp index 37ce2bf5..40d56bbd 100644 --- a/src/net/manaserv/chathandler.cpp +++ b/src/net/manaserv/chathandler.cpp @@ -26,6 +26,7 @@ #include "client.h" #include "channel.h" #include "channelmanager.h" +#include "eventmanager.h" #include "gui/chat.h" @@ -149,7 +150,7 @@ void ChatHandler::handleGameChatMessage(Net::MessageIn &msg) if (id == 0) { - localChatTab->chatLog(chatMsg, BY_SERVER); + SERVER_NOTICE(chatMsg) return; } @@ -198,13 +199,13 @@ void ChatHandler::handleEnterChannelResponse(Net::MessageIn &msg) } else { - localChatTab->chatLog(_("Error joining channel."), BY_SERVER); + SERVER_NOTICE(_("Error joining channel.")) } } void ChatHandler::handleListChannelsResponse(Net::MessageIn &msg) { - localChatTab->chatLog(_("Listing channels."), BY_SERVER); + SERVER_NOTICE(_("Listing channels.")) while (msg.getUnreadLength()) { std::string channelName = msg.readString(); @@ -214,9 +215,9 @@ void ChatHandler::handleListChannelsResponse(Net::MessageIn &msg) numUsers << msg.readInt16(); channelName += " - "; channelName += numUsers.str(); - localChatTab->chatLog(channelName, BY_SERVER); + SERVER_NOTICE(channelName) } - localChatTab->chatLog(_("End of channel list."), BY_SERVER); + SERVER_NOTICE(_("End of channel list.")) } void ChatHandler::handlePrivateMessage(Net::MessageIn &msg) @@ -341,7 +342,7 @@ void ChatHandler::handleWhoResponse(Net::MessageIn &msg) { break; } - localChatTab->chatLog(userNick, BY_SERVER); + SERVER_NOTICE(userNick) } } |