Preparing for the core session state being stored in the database.
[quassel.git] / src / common / network.cpp
index 05efa9c..c0de22e 100644 (file)
@@ -117,6 +117,7 @@ NetworkInfo Network::networkInfo() const {
   info.networkName = networkName();
   info.networkId = networkId();
   info.identity = identity();
+  info.codecForServer = codecForServer();
   info.codecForEncoding = codecForEncoding();
   info.codecForDecoding = codecForDecoding();
   info.serverList = serverList();
@@ -128,6 +129,7 @@ NetworkInfo Network::networkInfo() const {
   info.useAutoReconnect = useAutoReconnect();
   info.autoReconnectInterval = autoReconnectInterval();
   info.autoReconnectRetries = autoReconnectRetries();
+  info.unlimitedReconnectRetries = unlimitedReconnectRetries();
   info.rejoinChannels = rejoinChannels();
   return info;
 }
@@ -649,7 +651,11 @@ void Network::initSetIrcUsers(const QStringList &hostmasks) {
   }
 }
 
-void Network::initSetChannels(const QStringList &channels) {
+void Network::initSetIrcChannels(const QStringList &channels) {
+  // FIXME This does not work correctly, "received data for unknown User" triggers
+  //       So we disable this for now
+  return;
+
   if(!_ircChannels.empty())
     return;
   foreach(QString channel, channels)
@@ -723,7 +729,7 @@ void Network::requestConnect() const {
   if(proxy()->proxyMode() == SignalProxy::Client) emit connectRequested(); // on the client this triggers calling this slot on the core
   else {
     if(connectionState() != Disconnected) {
-      qWarning() << "Requesting connect while not being disconnected!";
+      qWarning() << "Requesting connect while already being connected!";
       return;
     }
     emit connectRequested(networkId());  // and this is for CoreSession :)
@@ -858,11 +864,16 @@ QDataStream &operator>>(QDataStream &in, NetworkInfo &info) {
   return in;
 }
 
-
-
-
-
-
+QDebug operator<<(QDebug dbg, const NetworkInfo &i) {
+  dbg.nospace() << "(id = " << i.networkId << " name = " << i.networkName << " identity = " << i.identity
+      << " codecForServer = " << i.codecForServer << " codecForEncoding = " << i.codecForEncoding << " codecForDecoding = " << i.codecForDecoding
+      << " serverList = " << i.serverList << " useRandomServer = " << i.useRandomServer << " perform = " << i.perform
+      << " useAutoIdentify = " << i.useAutoIdentify << " autoIdentifyService = " << i.autoIdentifyService << " autoIdentifyPassword = " << i.autoIdentifyPassword
+      << " useAutoReconnect = " << i.useAutoReconnect << " autoReconnectInterval = " << i.autoReconnectInterval
+      << " autoReconnectRetries = " << i.autoReconnectRetries << " unlimitedReconnectRetries = " << i.unlimitedReconnectRetries
+      << " rejoinChannels = " << i.rejoinChannels << ")";
+  return dbg.space();
+}