Don't connect to SSLed IRC servers when ZNC is not compiled with SSL

This commit is contained in:
Kyle Fuller
2011-10-04 15:20:38 +00:00
parent a4aedc90d3
commit c7d171bfa1

View File

@@ -828,16 +828,18 @@ bool CIRCNetwork::Connect() {
CZNC::Get().AddServerThrottle(pServer->GetName());
CIRCSock *pIRCSock = new CIRCSock(this);
pIRCSock->SetPass(pServer->GetPass());
bool bSSL = false;
#ifdef HAVE_LIBSSL
if (pServer->IsSSL()) {
bSSL = true;
bool bSSL = pServer->IsSSL();
#ifndef HAVE_LIBSSL
if (bSSL) {
PutStatus("Cannot connect to [" + pServer->GetString(false) + "], ZNC is not compiled with SSL.");
CZNC::Get().AddNetworkToQueue(this);
return false;
}
#endif
CIRCSock *pIRCSock = new CIRCSock(this);
pIRCSock->SetPass(pServer->GetPass());
DEBUG("Connecting user/network [" << m_sName << "/" << m_sName << "]");
NETWORKMODULECALL(OnIRCConnecting(pIRCSock), m_pUser, this, NULL,