summaryrefslogtreecommitdiff
path: root/src/net/chathandler.cpp
diff options
context:
space:
mode:
authorDavid Athay <ko2fan@gmail.com>2008-04-14 17:05:29 +0000
committerDavid Athay <ko2fan@gmail.com>2008-04-14 17:05:29 +0000
commitbbb40f595e6e20e5106a23e6aa606b825b1e62b4 (patch)
treedbfe4adf16eb49be93c031587c2ff1694ac0d0e4 /src/net/chathandler.cpp
parent1ace3a1cec2ea8490af5af0b7d131394543fea11 (diff)
downloadmana-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.cpp11
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();