QVariantMap reply;
// Just version information -- check it!
- uint ver = 0;
- if(!msg.contains("ProtocolVersion") && msg["ClientBuild"].toUInt() >= 732) ver = 1; // FIXME legacy
- if(msg.contains("ProtocolVersion")) ver = msg["ProtocolVersion"].toUInt();
+ uint ver = msg["ProtocolVersion"].toUInt();
if(ver < Quassel::buildInfo().coreNeedsProtocol) {
reply["MsgType"] = "ClientInitReject";
reply["Error"] = tr("<b>Your Quassel Client is too old!</b><br>"
reply["CoreVersion"] = Quassel::buildInfo().fancyVersionString;
reply["CoreDate"] = Quassel::buildInfo().buildDate;
- reply["CoreBuild"] = 860; // FIXME legacy
reply["ProtocolVersion"] = Quassel::buildInfo().protocolVersion;
// TODO: Make the core info configurable
int uptime = startTime().secsTo(QDateTime::currentDateTime().toUTC());
sess->addClient(socket);
}
+void Core::setupInternalClientSession(SignalProxy *proxy) {
+ UserId uid = 3; // FIXME!!!11
+ // Find or create session for validated user
+ SessionThread *sess;
+ if(sessions.contains(uid))
+ sess = sessions[uid];
+ else
+ sess = createSession(uid);
+ sess->addClient(proxy);
+}
+
SessionThread *Core::createSession(UserId uid, bool restore) {
if(sessions.contains(uid)) {
quWarning() << "Calling createSession() when a session for the user already exists!";