ammend 2.1.5 added setting for experimental irc support

This commit is contained in:
fourtf
2019-09-22 17:12:09 +02:00
parent 2c25c8a5f5
commit ca0db97d09
4 changed files with 35 additions and 26 deletions
+21 -20
View File
@@ -66,29 +66,30 @@ void IrcServer::initializeConnection(IrcConnection *connection,
connection->setRealName(this->data_->real.isEmpty() ? this->data_->user
: this->data_->nick);
#if 0
switch (this->data_->authType)
if (getSettings()->enableExperimentalIrc)
{
case IrcAuthType::Sasl:
connection->setSaslMechanism("PLAIN");
[[fallthrough]];
case IrcAuthType::Pass:
this->data_->getPassword(
this, [conn = new QObjectRef(connection) /* can't copy */,
this](const QString &password) mutable {
if (*conn)
{
(*conn)->setPassword(password);
this->open(Both);
}
switch (this->data_->authType)
{
case IrcAuthType::Sasl:
connection->setSaslMechanism("PLAIN");
[[fallthrough]];
case IrcAuthType::Pass:
this->data_->getPassword(
this, [conn = new QObjectRef(connection) /* can't copy */,
this](const QString &password) mutable {
if (*conn)
{
(*conn)->setPassword(password);
this->open(Both);
}
delete conn;
});
break;
default:
this->open(Both);
delete conn;
});
break;
default:
this->open(Both);
}
}
#endif
QObject::connect(
connection, &Communi::IrcConnection::socketError, this,