From 912df73b5617c45a3360720f5eb3831726fe5f82 Mon Sep 17 00:00:00 2001 From: reality Date: Mon, 28 Oct 2013 14:49:09 +0000 Subject: [PATCH] such crashy --- modules/steam/steam.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/steam/steam.js b/modules/steam/steam.js index 06956c8..388ae3a 100644 --- a/modules/steam/steam.js +++ b/modules/steam/steam.js @@ -70,7 +70,7 @@ var steam = function(dbot) { }, 'json': true }, function(err, res, body) { - if(_.has(body, 'response') && _.has(body.response, 'players')) { + if(_.has(body, 'response') && _.has(body.response, 'players') && body.response.player != null) { callback(null, body.response.players[0]); } else { callback(true, null); @@ -98,6 +98,8 @@ var steam = function(dbot) { }); if(_.has(player, 'gameserverip')) { var host = player.gameserverip.split(':'); + :qa + :qa output += ' (Server: ' + host[0] + ' Port: ' + host[1] + ')'; } event.reply(output); @@ -115,12 +117,12 @@ var steam = function(dbot) { })); } } else { - event.reply('something went wrong'); + event.reply('Unknown Steam Username'); } }); } } else { - event.reply('something went wrong'); + event.reply('Unknown Steam Username'); } }.bind(this)); }.bind(this));