webirc localhost entries
This commit is contained in:
parent
3f99a9a35c
commit
ee70d8c865
@ -35,8 +35,14 @@ function resolveAddress(address, force) {
|
|||||||
|
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
dns.resolve(address, (err, data) => {
|
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);
|
if(err!=null) return reject(err);
|
||||||
let ip = data.length > 0 ? data[0] : null;
|
let ip = data.length > 0 ? data[0] : null;
|
||||||
|
|
||||||
if(ip) {
|
if(ip) {
|
||||||
resolve(ip);
|
resolve(ip);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user