This commit is contained in:
Flummi 2016-09-18 15:07:45 +00:00
parent 511893765b
commit 18b48ae4a6

View File

@ -10,9 +10,9 @@ module.exports = (lib) => {
});
}
});
lib.bot.names(e.channel.getName(), e.network, (names) => {
e.channel.names = names;
if(e.channel.names && e.user.nick !== lib.bot.me.nick) {
if(e.channel.names && e.user.nick !== lib.bot.me.nick) {
lib.bot.names(e.channel.getName(), e.network, (names) => {
e.channel.names = names;
var userCount = Object.keys(e.channel.names).length;
lib.sql.query('select value from `f0ck`.`vars` where `key` = "highest_user_count" AND `channel` = ? AND `network` = ? limit 1', [e.channel.getName(), e.network], (err, rows) => {
if(!rows.length) {
@ -24,7 +24,7 @@ module.exports = (lib) => {
e.reply('New user record for ' + e.channel.getName() + ': ' + userCount);
}
});
}
});
});
}
});
};