since seezer was too slow: fixing double click buffer switches in the chatmonitor
[quassel.git] / src / core / sqlitestorage.cpp
index 1d732d3..5f36e83 100644 (file)
@@ -591,6 +591,9 @@ void SqliteStorage::bindNetworkInfo(QSqlQuery &query, const NetworkInfo &info) {
   query.bindValue(":useautoidentify", info.useAutoIdentify ? 1 : 0);
   query.bindValue(":autoidentifyservice", info.autoIdentifyService);
   query.bindValue(":autoidentifypassword", info.autoIdentifyPassword);
+  query.bindValue(":usesasl", info.useSasl ? 1 : 0);
+  query.bindValue(":saslaccount", info.saslAccount);
+  query.bindValue(":saslpassword", info.saslPassword);
   query.bindValue(":useautoreconnect", info.useAutoReconnect ? 1 : 0);
   query.bindValue(":autoreconnectinterval", info.autoReconnectInterval);
   query.bindValue(":autoreconnectretries", info.autoReconnectRetries);
@@ -780,6 +783,9 @@ QList<NetworkInfo> SqliteStorage::networks(UserId user) {
         net.autoReconnectRetries = networksQuery.value(13).toInt();
         net.unlimitedReconnectRetries = networksQuery.value(14).toInt() == 1 ? true : false;
         net.rejoinChannels = networksQuery.value(15).toInt() == 1 ? true : false;
+        net.useSasl = networksQuery.value(16).toInt() == 1 ? true : false;
+        net.saslAccount = networksQuery.value(17).toString();
+        net.saslPassword = networksQuery.value(18).toString();
 
         serversQuery.bindValue(":networkid", net.networkId.toInt());
         safeExec(serversQuery);
@@ -1037,6 +1043,7 @@ BufferInfo SqliteStorage::bufferInfo(UserId user, const NetworkId &networkId, Bu
       createQuery.bindValue(":buffertype", (int)type);
       createQuery.bindValue(":buffername", buffer);
       createQuery.bindValue(":buffercname", buffer.toLower());
+      createQuery.bindValue(":joined", type & BufferInfo::ChannelBuffer ? 1 : 0);
 
       unlock();
       lockForWrite();
@@ -1729,6 +1736,9 @@ bool SqliteMigrationReader::readMo(NetworkMO &network) {
   network.awaymessage = value(19).toString();
   network.attachperform = value(20).toString();
   network.detachperform = value(21).toString();
+  network.usesasl = value(22).toInt() == 1 ? true : false;
+  network.saslaccount = value(23).toString();
+  network.saslpassword = value(24).toString();
   return true;
 }