check if registered
This commit is contained in:
parent
a23a4ac903
commit
e87499e705
|
@ -14,6 +14,7 @@ module.exports = (bot, lib) => {
|
||||||
|
|
||||||
if( name in e.channel.names ) {
|
if( name in e.channel.names ) {
|
||||||
bot.whois(name.trim(), e.network, (err, data) => {
|
bot.whois(name.trim(), e.network, (err, data) => {
|
||||||
|
if(data.account !== null) {
|
||||||
var host = data.username+'@'+data.hostname;
|
var host = data.username+'@'+data.hostname;
|
||||||
if(host in lib.admins) {
|
if(host in lib.admins) {
|
||||||
if(level <= 0) {
|
if(level <= 0) {
|
||||||
|
@ -35,6 +36,9 @@ module.exports = (bot, lib) => {
|
||||||
e.reply('added new user '+data.nick+' ('+host+') with level '+level);
|
e.reply('added new user '+data.nick+' ('+host+') with level '+level);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
e.reply('user '+data.nick+' isn\'t registered');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue
Block a user