fixed inconsistency issues. Upgrade and Distclean is strongly recommended
[quassel.git] / src / core / ircserverhandler.cpp
index 6a220db..1753880 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,17 +321,11 @@ 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
   networkConnection->ctcpHandler()->parse(Message::Plain, prefix, target, userDecode(ircuser->nick(), params[1]));
-//   QStringList messages = 
-
-//   foreach(QString message, messages) {
-//     emit displayMsg(Message::Plain, target, message, prefix);
-//   }
-  
 }
 
 void IrcServerHandler::handleQuit(QString prefix, QList<QByteArray> params) {