#ifdef Q_OS_WIN32
# include <windows.h>
#else
+# include <unistd.h>
# include <termios.h>
#endif /* Q_OS_WIN32 */
+// umask
+#ifndef Q_OS_WIN32
+# include <sys/types.h>
+# include <sys/stat.h>
+#endif /* Q_OS_WIN32 */
+
// ==============================
// Custom Events
// ==============================
Core::Core()
: _storage(0)
{
+#ifndef Q_OS_WIN32
+ umask(S_IRWXG | S_IRWXO);
+#endif /* Q_OS_WIN32 */
_startTime = QDateTime::currentDateTime().toUTC(); // for uptime :)
Quassel::loadTranslation(QLocale::system());
}
setupData["AdminUser"] = "AdminUser";
setupData["AdminPasswd"] = QString::number(pass);
- setupData["Backend"] = _storageBackends[_storageBackends.keys().first()]->displayName();
+ setupData["Backend"] = QString("SQLite"); // mono client currently needs sqlite
return setupCore(setupData);
}
.arg(Quassel::buildInfo().buildDate)
.arg(updays).arg(uphours,2,10,QChar('0')).arg(upmins,2,10,QChar('0')).arg(startTime().toString(Qt::TextDate));
+ reply["CoreFeatures"] = (int)Quassel::features();
+
#ifdef HAVE_SSL
SslServer *sslServer = qobject_cast<SslServer *>(&_server);
QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);
return;
}
- if(_storage->addUser(username, password).isValid()) {
+ if(_configured && _storage->addUser(username, password).isValid()) {
out << "Added user " << username << " successfully!" << endl;
} else {
qWarning() << "Unable to add user:" << qPrintable(username);
return;
}
- if(_storage->updateUser(userId, password)) {
+ if(_configured && _storage->updateUser(userId, password)) {
out << "Password changed successfuly!" << endl;
} else {
qWarning() << "Failed to change password!";