Fix trying to connect to irc when no irc is enabled

pull/11/head
Geoffrey Merck 4 years ago
parent 358e753032
commit 8aea19f87c

@ -120,6 +120,7 @@ TConfigValue * CConfig::readKeyAndValue(const std::string s) const
bool CConfig::getValue(const std::string &section, const std::string& key, bool &value, bool defaultValue) const
{
value = defaultValue;
std::string valueTemp;
std::string dafaultValueStr = defaultValue ? "true" : "false";
bool ret = getValue(section, key, valueTemp, dafaultValueStr, {"true", "1", "false", "0"});

@ -206,13 +206,15 @@ bool CDStarGatewayApp::createThread()
CIRCDDB * ircDDB = new CIRCDDBClient(ircDDBConfig.hostname, 9007U, ircDDBConfig.username, ircDDBConfig.password, FULL_PRODUCT_NAME, gatewayConfig.address, ircDDBConfig.isQuadNet);
clients.push_back(ircDDB);
}
CIRCDDBMultiClient* multiClient = new CIRCDDBMultiClient(clients);
bool res = multiClient->open();
if (!res) {
CLog::logInfo("Cannot initialise the ircDDB protocol handler\n");
return false;
if(clients.size() > 0U) {
CIRCDDBMultiClient* multiClient = new CIRCDDBMultiClient(clients);
bool res = multiClient->open();
if (!res) {
CLog::logInfo("Cannot initialise the ircDDB protocol handler\n");
return false;
}
m_thread->setIRC(multiClient);
}
m_thread->setIRC(multiClient);
// Setup Dextra
TDextra dextraConfig;

Loading…
Cancel
Save

Powered by TurnKey Linux.