diff --git a/server/teemant_irc/irc.js b/server/teemant_irc/irc.js index 3898553..e117663 100644 --- a/server/teemant_irc/irc.js +++ b/server/teemant_irc/irc.js @@ -429,7 +429,7 @@ class IRCConnection extends EventEmitter { autojoin: [], secure: globalConfig.secure_by_default, password: '', - address: '0.0.0.0', + address: providedInfo.server, rejectUnauthorized: globalConfig.rejectUnauthorizedCertificates }; diff --git a/server/webirc.js b/server/webirc.js index aef7595..0c63feb 100644 --- a/server/webirc.js +++ b/server/webirc.js @@ -34,12 +34,12 @@ function resolveAddress(address, force) { } new Promise((resolve, reject) => { + if(address === '127.0.0.1' || address === '0.0.0.0' || address === 'localhost') { + logger.debugLog('** WEBIRC ** Ignoring localhost entry..'); + return resolve('127.0.0.1'); + } + dns.resolve(address, (err, data) => { - if(address === '127.0.0.1' || address === '0.0.0.0' || address === 'localhost') { - logger.debugLog('** WEBIRC ** Ignoring localhost entry..'); - return resolve('127.0.0.1'); - } - if(err!=null) return reject(err); let ip = data.length > 0 ? data[0] : null;