diff options
author | David Athay <ko2fan@gmail.com> | 2008-04-14 17:05:29 +0000 |
---|---|---|
committer | David Athay <ko2fan@gmail.com> | 2008-04-14 17:05:29 +0000 |
commit | bbb40f595e6e20e5106a23e6aa606b825b1e62b4 (patch) | |
tree | dbfe4adf16eb49be93c031587c2ff1694ac0d0e4 /src/net/chathandler.cpp | |
parent | 1ace3a1cec2ea8490af5af0b7d131394543fea11 (diff) | |
download | mana-bbb40f595e6e20e5106a23e6aa606b825b1e62b4.tar.gz mana-bbb40f595e6e20e5106a23e6aa606b825b1e62b4.tar.bz2 mana-bbb40f595e6e20e5106a23e6aa606b825b1e62b4.tar.xz mana-bbb40f595e6e20e5106a23e6aa606b825b1e62b4.zip |
Added new TabbedArea which extends gui::TabbedArea. Changed Guild and
Chat windows to use new TabbedArea. Added private messaging.
Diffstat (limited to 'src/net/chathandler.cpp')
-rw-r--r-- | src/net/chathandler.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/net/chathandler.cpp b/src/net/chathandler.cpp index d10c1556..4d48865a 100644 --- a/src/net/chathandler.cpp +++ b/src/net/chathandler.cpp @@ -137,6 +137,17 @@ void ChatHandler::handleMessage(MessageIn &msg) chatWindow->chatLog("End of channel list", BY_SERVER); break; + case CPMSG_PRIVMSG: + userNick = msg.readString(); + chatMsg = msg.readString(); + + if (!chatWindow->tabExists(userNick)) + { + chatWindow->createNewChannelTab(userNick); + chatWindow->chatLog(userNick + ": " + chatMsg, BY_OTHER, userNick); + } + break; + case CPMSG_PUBMSG: channelId = msg.readInt16(); userNick = msg.readString(); |