summaryrefslogtreecommitdiff
path: root/src/net/ea/chathandler.cpp
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2009-03-26 23:04:14 -0600
committerJared Adams <jaxad0127@gmail.com>2009-03-26 23:04:14 -0600
commite64b5a25a54f56bc836af57223e37449a1daffe8 (patch)
treef14f80a0bdc5268a2c4e2c70b6afcac080242ac5 /src/net/ea/chathandler.cpp
parente03bd01fa02da71d41b85d3710a971da5a9c6c32 (diff)
downloadmana-e64b5a25a54f56bc836af57223e37449a1daffe8.tar.gz
mana-e64b5a25a54f56bc836af57223e37449a1daffe8.tar.bz2
mana-e64b5a25a54f56bc836af57223e37449a1daffe8.tar.xz
mana-e64b5a25a54f56bc836af57223e37449a1daffe8.zip
Major clean up of ChatTab handling
ChatTabs now manage their own adding/removal from the chat window, which lost most of it's chat related messages. Whisper handling is stil done by the ChatWindow, but it no longer manages any other tabs. ChannelTab handling is now the sole responsability of the Channels they are attached to. The general tab is handled by Game.
Diffstat (limited to 'src/net/ea/chathandler.cpp')
-rw-r--r--src/net/ea/chathandler.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/net/ea/chathandler.cpp b/src/net/ea/chathandler.cpp
index aaf56555..c4743ff2 100644
--- a/src/net/ea/chathandler.cpp
+++ b/src/net/ea/chathandler.cpp
@@ -69,13 +69,13 @@ void ChatHandler::handleMessage(MessageIn &msg)
{
case 0x00:
// comment out since we'll local echo in chat.cpp instead, then only report failures
- //chatWindow->chatLog("Whisper sent", BY_SERVER);
+ //localChatTab->chatLog("Whisper sent", BY_SERVER);
break;
case 0x01:
- chatWindow->chatLog(_("Whisper could not be sent, user is offline"), BY_SERVER);
+ localChatTab->chatLog(_("Whisper could not be sent, user is offline"), BY_SERVER);
break;
case 0x02:
- chatWindow->chatLog(_("Whisper could not be sent, ignored by user"), BY_SERVER);
+ localChatTab->chatLog(_("Whisper could not be sent, ignored by user"), BY_SERVER);
break;
}
break;
@@ -94,7 +94,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
if (player_relations.hasPermission(nick, PlayerRelation::WHISPER))
chatWindow->whisper(nick, chatMsg);
else
- chatWindow->chatLog(chatMsg, BY_SERVER);
+ localChatTab->chatLog(chatMsg, BY_SERVER);
break;
@@ -118,7 +118,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
// We use getIgnorePlayer instead of ignoringPlayer here because ignorePlayer' side
// effects are triggered right below for Being::IGNORE_SPEECH_FLOAT.
if (player_relations.checkPermissionSilently(sender_name, PlayerRelation::SPEECH_LOG))
- chatWindow->chatLog(chatMsg, BY_OTHER);
+ localChatTab->chatLog(chatMsg, BY_OTHER);
chatMsg.erase(0, pos + 3);
trim(chatMsg);
@@ -142,7 +142,7 @@ void ChatHandler::handleMessage(MessageIn &msg)
if (msg.getId() == SMSG_PLAYER_CHAT)
{
- chatWindow->chatLog(chatMsg, BY_PLAYER);
+ localChatTab->chatLog(chatMsg, BY_PLAYER);
if (pos != std::string::npos)
chatMsg.erase(0, pos + 3);
@@ -153,20 +153,20 @@ void ChatHandler::handleMessage(MessageIn &msg)
}
else
{
- chatWindow->chatLog(chatMsg, BY_GM);
+ localChatTab->chatLog(chatMsg, BY_GM);
}
break;
}
case SMSG_WHO_ANSWER:
- chatWindow->chatLog("Online users: " + toString(msg.readInt32()),
+ localChatTab->chatLog("Online users: " + toString(msg.readInt32()),
BY_SERVER);
break;
case 0x010c:
// Display MVP player
msg.readInt32(); // id
- chatWindow->chatLog("MVP player", BY_SERVER);
+ localChatTab->chatLog("MVP player", BY_SERVER);
break;
}
}