Fix channel MySQL rank lookup fail (Again?)

This commit is contained in:
calzoneman 2013-03-20 23:22:43 -05:00
parent 79bdca3d90
commit 873603465c
1 changed files with 2 additions and 0 deletions

View File

@ -172,6 +172,8 @@ Channel.prototype.getRank = function(name) {
.replace(/\{1\}/, this.name)
.replace(/\{2\}/, name);
var results = db.querySync(query);
if(!results)
return Rank.Guest;
var rows = results.fetchAllSync();
if(rows.length == 0) {
return Rank.Guest;