summaryrefslogtreecommitdiff
path: root/src/net/chathandler.cpp
diff options
context:
space:
mode:
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();