summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
abd7bd3)
--oidentd Enable oidentd integration
--oidentd-conffile=[OIDENTD-CONFFILE] change path to oidentd configuration file
cliParser->addOption("select-backend <backendidentifier>", 0, "Switch storage backend (migrating data if possible)");
cliParser->addSwitch("add-user", 0, "Starts an interactive session to add a new core user");
cliParser->addOption("change-userpass <username>", 0, "Starts an interactive session to change the password of the user identified by username");
cliParser->addOption("select-backend <backendidentifier>", 0, "Switch storage backend (migrating data if possible)");
cliParser->addSwitch("add-user", 0, "Starts an interactive session to add a new core user");
cliParser->addOption("change-userpass <username>", 0, "Starts an interactive session to change the password of the user identified by username");
+ cliParser->addSwitch("oidentd", 0, "Enable oidentd integration");
+ cliParser->addOption("oidentd-conffile <file>", 0, "change path to oidentd configuration file");
connect(&_v6server, SIGNAL(newConnection()), this, SLOT(incomingConnection()));
if(!startListening()) exit(1); // TODO make this less brutal
connect(&_v6server, SIGNAL(newConnection()), this, SLOT(incomingConnection()));
if(!startListening()) exit(1); // TODO make this less brutal
- _oidentdConfigGenerator = new OidentdConfigGenerator(this);
+ if(Quassel::isOptionSet("oidentd"))
+ _oidentdConfigGenerator = new OidentdConfigGenerator(this);
connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(sslErrors(const QList<QSslError> &)));
#endif
connect(this, SIGNAL(newEvent(Event *)), coreSession()->eventManager(), SLOT(postEvent(Event *)));
connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(sslErrors(const QList<QSslError> &)));
#endif
connect(this, SIGNAL(newEvent(Event *)), coreSession()->eventManager(), SLOT(postEvent(Event *)));
- connect(this, SIGNAL(newSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16)));
+
+ if(Quassel::isOptionSet("oidentd"))
+ connect(this, SIGNAL(newSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16)), Core::instance()->oidentdConfigGenerator(), SLOT(addSocket(const CoreIdentity*,QHostAddress,quint16,QHostAddress,quint16)));
}
CoreNetwork::~CoreNetwork() {
}
CoreNetwork::~CoreNetwork() {
bool OidentdConfigGenerator::init() {
configDir = QDir::homePath();
configFileName = ".oidentd.conf";
bool OidentdConfigGenerator::init() {
configDir = QDir::homePath();
configFileName = ".oidentd.conf";
+
+ if(Quassel::isOptionSet("oidentd-conffile"))
+ configPath = Quassel::optionValue("oidentd-conffile");
+ else
+ configPath = configDir.absoluteFilePath(configFileName);
+
configTag = " stanza created by Quassel";
configTag = " stanza created by Quassel";
- _configFile = new QFile(configDir.absoluteFilePath(configFileName));
+ _configFile = new QFile(configPath);
qDebug() << "1: _configFile" << _configFile->fileName();
quasselStanza = QRegExp(QString("^lport .* { .* } #%1$").arg(configTag));
qDebug() << "1: _configFile" << _configFile->fileName();
quasselStanza = QRegExp(QString("^lport .* { .* } #%1$").arg(configTag));
#include <QDateTime>
#include <QHostAddress>
#include <QDateTime>
#include <QHostAddress>
#include "coreidentity.h"
#include <QDebug>
#include "coreidentity.h"
#include <QDebug>
public:
explicit OidentdConfigGenerator(QObject *parent = 0);
public:
explicit OidentdConfigGenerator(QObject *parent = 0);
- QDir configDir;
- QString configFileName;
-
QFile *_configFile;
QByteArray _config;
QFile *_configFile;
QByteArray _config;
+ QDir configDir;
+ QString configFileName;
+ QString configPath;
QRegExp quasselStanza;
};
QRegExp quasselStanza;
};