X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresession.cpp;h=ccfa2a1be629ac3b9e2560edbeb5130dba62b02f;hp=ec12da7b31ee6ec923e8ac5b3b5dd329b88fce56;hb=47b574c28983254b6679191f76ddb36fe7da7632;hpb=372e281c83794188819e2a74f570e16684778456 diff --git a/src/core/coresession.cpp b/src/core/coresession.cpp index ec12da7b..ccfa2a1b 100644 --- a/src/core/coresession.cpp +++ b/src/core/coresession.cpp @@ -48,6 +48,17 @@ CoreSession::CoreSession(UserId uid, Storage *_storage) : user(uid), storage(_st connect(storage, SIGNAL(bufferIdUpdated(BufferId)), coreProxy, SLOT(csUpdateBufferId(BufferId))); connect(this, SIGNAL(sessionDataChanged(const QString &, const QVariant &)), coreProxy, SLOT(csSessionDataChanged(const QString &, const QVariant &))); connect(coreProxy, SIGNAL(gsSessionDataChanged(const QString &, const QVariant &)), this, SLOT(storeSessionData(const QString &, const QVariant &))); + + /* Autoconnect. (When) do we actually do this? + QStringList list; + VarMap networks = retrieveSessionData("Networks").toMap(); + foreach(QString net, networks.keys()) { + if(networks[net].toMap()["AutoConnect"].toBool()) { + list << net; + } + } qDebug() << list; + if(list.count()) connectToIrc(list); + */ } CoreSession::~CoreSession() { @@ -147,7 +158,7 @@ void CoreSession::recvMessageFromServer(Message::Type type, QString target, QStr buf = storage->getBufferId(user, s->getNetwork(), target); } Message msg(buf, type, text, sender, flags); - msg.msgId = storage->logMessage(msg); //qDebug() << msg.msgId; + msg.msgId = storage->logMessage(msg); Q_ASSERT(msg.msgId); emit displayMsg(msg); } @@ -173,6 +184,7 @@ QVariant CoreSession::sessionState() { v["SessionData"] = sessionData; mutex.unlock(); v["Networks"] = QVariant(servers.keys()); + // v["Payload"] = QByteArray(100000000, 'a'); return v; }