X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=29174b62b7ba973a18b8ffa1b4d4905fa49ebfcc;hb=ddefd5eede5bb9c920543a1bc2076fafc45f85d0;hp=0b34f297c1559654f57f6b949014c85e79368549;hpb=328b48e6fbd78d6158eb55296c0843fc5a41bcfa;p=quassel.git diff --git a/src/core/core.cpp b/src/core/core.cpp index 0b34f297..29174b62 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -41,8 +41,11 @@ # include #endif /* Q_OS_WIN32 */ -#include -#include +// umask +#ifndef Q_OS_WIN32 +# include +# include +#endif /* Q_OS_WIN32 */ // ============================== // Custom Events @@ -77,7 +80,9 @@ void Core::destroy() { 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()); @@ -533,6 +538,8 @@ void Core::processClientMessage(QTcpSocket *socket, const QVariantMap &msg) { .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(&_server); QSslSocket *sslSocket = qobject_cast(socket); @@ -868,7 +875,7 @@ void Core::createUser() { 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); @@ -906,7 +913,7 @@ void Core::changeUserPass(const QString &username) { return; } - if(_storage->updateUser(userId, password)) { + if(_configured && _storage->updateUser(userId, password)) { out << "Password changed successfuly!" << endl; } else { qWarning() << "Failed to change password!";