X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcore.cpp;h=6dc4fa7084057cc74d67f2bfd5cfcf81500a43dd;hp=03a7f81f2a5273f4d3a9c7453200f6c6352e3cf3;hb=26ab99ecabdbff2c7b66dc28039fe904bbce0520;hpb=a18fc9cf59a6329cb67d4eb7bd0197fceacdf7d8 diff --git a/src/core/core.cpp b/src/core/core.cpp index 03a7f81f..6dc4fa70 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -41,11 +41,10 @@ # include #endif /* Q_OS_WIN32 */ -// umask -#ifndef Q_OS_WIN32 +#ifdef HAVE_UMASK # include # include -#endif /* Q_OS_WIN32 */ +#endif /* HAVE_UMASK */ // ============================== // Custom Events @@ -80,9 +79,9 @@ void Core::destroy() { Core::Core() : _storage(0) { -#ifndef Q_OS_WIN32 +#ifdef HAVE_UMASK umask(S_IRWXG | S_IRWXO); -#endif /* Q_OS_WIN32 */ +#endif _startTime = QDateTime::currentDateTime().toUTC(); // for uptime :) Quassel::loadTranslation(QLocale::system()); @@ -201,6 +200,9 @@ void Core::init() { connect(&_server, SIGNAL(newConnection()), this, SLOT(incomingConnection())); connect(&_v6server, SIGNAL(newConnection()), this, SLOT(incomingConnection())); if(!startListening()) exit(1); // TODO make this less brutal + + if(Quassel::isOptionSet("oidentd")) + _oidentdConfigGenerator = new OidentdConfigGenerator(this); } Core::~Core() { @@ -240,6 +242,7 @@ void Core::restoreState() { return; } */ + QVariantList activeSessions = s.coreState().toMap()["ActiveSessions"].toList(); if(activeSessions.count() > 0) { quInfo() << "Restoring previous core state..."; @@ -272,8 +275,7 @@ QString Core::setupCore(QVariantMap setupData) { if(user.isEmpty() || password.isEmpty()) { return tr("Admin user or password not set."); } - _configured = initStorage(setupData, true); - if(!_configured) { + if(_configured || !(_configured = initStorage(setupData, true))) { return tr("Could not setup storage!"); } CoreSettings s; @@ -913,7 +915,7 @@ void Core::changeUserPass(const QString &username) { } if(_configured && _storage->updateUser(userId, password)) { - out << "Password changed successfuly!" << endl; + out << "Password changed successfully!" << endl; } else { qWarning() << "Failed to change password!"; }