fixed the target buffers for queries
[quassel.git] / src / core / ircserverhandler.cpp
index 6a220db..09b53d3 100644 (file)
@@ -285,9 +285,9 @@ void IrcServerHandler::handleNotice(QString prefix, QList<QByteArray> params) {
 
   QString target = serverDecode(params[0]);
 
-  // are we the target?
+  // kick notices to the server buffer if they are directly addressed to us
   if(network()->isMyNick(target))
-    target = nickFromMask(target);
+    target = QString("");
 
   networkConnection->ctcpHandler()->parse(Message::Notice, prefix, target, userDecode(prefix, params[1]));
 }
@@ -321,7 +321,7 @@ void IrcServerHandler::handlePrivmsg(QString prefix, QList<QByteArray> params) {
 
   // are we the target?
   if(network()->isMyNick(target))
-    target = nickFromMask(target);
+    target = nickFromMask(ircuser->nick());
 
   // it's possible to pack multiple privmsgs into one param using ctcp
   // - > we let the ctcpHandler do the work