X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=1833927225008c3cc606f7f22e1817dfe36a719c;hb=671e451cf1c10a6e3f442af82b58bfc4de0cb5a2;hp=b156b2dc70dd900d975aae58f4e575bbfb1138c4;hpb=c9ee7972b2c9b84e37f363befa05bf5fb04114af;p=quassel.git diff --git a/src/core/core.cpp b/src/core/core.cpp index b156b2dc..18339272 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -55,6 +55,9 @@ Core::Core() : storage(0) { if(!_storageBackends.count()) { qWarning() << qPrintable(tr("Could not initialize any storage backend! Exiting...")); + qWarning() << qPrintable(tr("Currently, Quassel only supports SQLite3. You need to build your\n" + "Qt library with the sqlite plugin enabled in order for quasselcore\n" + "to work.")); exit(1); // TODO make this less brutal (especially for mono client -> popup) } connect(&_storageSyncTimer, SIGNAL(timeout()), this, SLOT(syncStorage())); @@ -309,6 +312,11 @@ QList Core::requestBuffers(UserId user) { return instance()->storage->requestBuffers(user); } +QList Core::requestBufferIdsForNetwork(UserId user, NetworkId networkId) { + QMutexLocker locker(&mutex); + return instance()->storage->requestBufferIdsForNetwork(user, networkId); +} + bool Core::removeBuffer(const UserId &user, const BufferId &bufferId) { QMutexLocker locker(&mutex); return instance()->storage->removeBuffer(user, bufferId); @@ -386,8 +394,10 @@ void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) { QVariantMap reply; // Just version information -- check it! - if((msg.contains("ClientBuild") && msg["ClientBuild"].toUInt() < 732) - || (!msg.contains("ClientBuild") && msg["ProtocolVersion"].toUInt() < Global::coreNeedsProtocol)) { + uint ver = 0; + if(!msg.contains("ProtocolVersion") && msg["ClientBuild"].toUInt() >= 732) ver = 1; // FIXME legacy + if(msg.contains("ProtocolVersion")) ver = msg["ProtocolVersion"].toUInt(); + if(ver < Global::coreNeedsProtocol) { reply["MsgType"] = "ClientInitReject"; reply["Error"] = tr("Your Quassel Client is too old!
" "This core needs at least client/core protocol version %1.
"