From 18b48ae4a63016220e6a8daa71e56bf6c7b5fecd Mon Sep 17 00:00:00 2001 From: Flummi Date: Sun, 18 Sep 2016 15:07:45 +0000 Subject: [PATCH] ups --- src/events/join.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/events/join.js b/src/events/join.js index d0328b1..39d0398 100644 --- a/src/events/join.js +++ b/src/events/join.js @@ -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); } }); - } - }); + }); + } }); }; \ No newline at end of file