identd: Implement --ident-port option
authorJanne Koschinski <janne@kuschku.de>
Tue, 8 May 2018 15:44:25 +0000 (17:44 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 18 Jun 2018 19:25:50 +0000 (21:25 +0200)
src/common/main.cpp
src/core/identserver.cpp

index cedd3c3..199f175 100644 (file)
@@ -192,7 +192,7 @@ int main(int argc, char **argv)
     cliParser->addOption("oidentd-conffile", 0, "Set path to oidentd configuration file", "file");
     cliParser->addSwitch("strict-ident", 0, "Use users' quasselcore username as ident reply. Ignores each user's configured ident setting.");
     cliParser->addSwitch("ident-daemon", 0, "Enable internal ident daemon");
-    cliParser->addOption("ident-port", 'p', "The port quasselcore will listen at for ident requests. Only meaningful with --ident-daemon", "port", "10113");
+    cliParser->addOption("ident-port", 0, "The port quasselcore will listen at for ident requests. Only meaningful with --ident-daemon", "10113");
 #ifdef HAVE_SSL
     cliParser->addSwitch("require-ssl", 0, "Require SSL for remote (non-loopback) client connections");
     cliParser->addOption("ssl-cert", 0, "Specify the path to the SSL Certificate", "path", "configdir/quasselCert.pem");
index 08b1b67..ffb2f15 100644 (file)
@@ -32,7 +32,7 @@ IdentServer::IdentServer(bool strict, QObject *parent) : QObject(parent), _stric
 IdentServer::~IdentServer() = default;
 
 bool IdentServer::startListening() {
-    uint16_t port = 10113;
+    uint16_t port = Quassel::optionValue("ident-port").toUShort();
 
     bool success = false;
     if (_v6server.listen(QHostAddress("::1"), port)) {