diff --git a/bot.js b/bot.js index 2be394493..6f29e83ae 100755 --- a/bot.js +++ b/bot.js @@ -313,7 +313,7 @@ function formatUptime(uptime) { controller.on('channel_leave',function(bot,message) { controller.storage.users.get(message.user, function(err, user) { - if(user.name!==undefined) { + if(user && user.name) { bot.reply(message,"Ok, " + user.name+", go find a new channel of your own with blackjack and hookers!"); } else {