Removing debug info from core, and don't remove trailing spaces in msgs anymore
[quassel.git] / src / core / networkconnection.cpp
index 163f220..a6d4e30 100644 (file)
@@ -279,7 +279,7 @@ void NetworkConnection::disconnectFromIrc(bool requested) {
 
 void NetworkConnection::socketHasData() {
   while(socket.canReadLine()) {
-    QByteArray s = socket.readLine().trimmed();
+    QByteArray s = socket.readLine();
     ircServerHandler()->handleServerMsg(s);
   }
 }
@@ -347,6 +347,10 @@ void NetworkConnection::socketInitialized() {
     disconnectFromIrc();
     return;
   }
+  QString passwd = network()->serverList()[_lastUsedServerlistIndex].toMap()["Password"].toString();
+  if(!passwd.isEmpty()) {
+    putRawLine(serverEncode(QString("PASS %1").arg(passwd)));
+  }
   putRawLine(serverEncode(QString("NICK :%1").arg(identity->nicks()[0])));  // FIXME: try more nicks if error occurs
   putRawLine(serverEncode(QString("USER %1 8 * :%2").arg(identity->ident(), identity->realName())));
 }