From d184a251e43e3855bd2950155013d6b350263b07 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Mon, 15 Sep 2014 21:19:41 +0000 Subject: [PATCH 1/2] whoops --- jsbot | 2 +- modules/atheme/atheme.js | 3 ++- modules/report/api.js | 2 +- modules/users/api.js | 3 +++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/jsbot b/jsbot index 606d0cd..139a3aa 160000 --- a/jsbot +++ b/jsbot @@ -1 +1 @@ -Subproject commit 606d0cdcddfda9d7328cfa0b65bb4a3079d77d9e +Subproject commit 139a3aad5a8b5c71dfe43fdc3f04d29d8b4104df diff --git a/modules/atheme/atheme.js b/modules/atheme/atheme.js index f76fe3d..b315414 100644 --- a/modules/atheme/atheme.js +++ b/modules/atheme/atheme.js @@ -51,7 +51,7 @@ var atheme = function(dbot) { }); delete this.hostStack[server][mask]; } - }.bind(this), 2000); + }.bind(this), 5000); } }; @@ -104,6 +104,7 @@ var atheme = function(dbot) { }); }.bind(this), function() { console.log('DONE'); +console.log(allFlags); _.each(this.flagStack[event.server][end[1]].callbacks, function(callback) { callback(null, this.flagStack[event.server][end[1]].flags); }.bind(this)); diff --git a/modules/report/api.js b/modules/report/api.js index 7cb78a1..e8cf9ae 100644 --- a/modules/report/api.js +++ b/modules/report/api.js @@ -40,7 +40,7 @@ var api = function(dbot) { async.each(ops, function(op, done) { dbot.api.users.isOnline(server, cName, op, function(err, user, online) { if(!err && !online) offlineOps[op] = user; - if(user.currentNick !== op) { + if(user && user.currentNick !== op) { ops = _.without(ops, op); ops.push(user.currentNick); } diff --git a/modules/users/api.js b/modules/users/api.js index c35878e..b9368bc 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -66,6 +66,9 @@ var api = function(dbot) { } }; + api['getUserAliases'].external = true; + api['getUserAliases'].extMap = [ 'id', 'callback' ]; + return api; }; From 5289efc72c055cc5b3e88cce70001798fb6650a1 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Fri, 3 Oct 2014 20:54:30 +0000 Subject: [PATCH 2/2] blah --- modules/atheme/atheme.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/atheme/atheme.js b/modules/atheme/atheme.js index 3cbd818..b4ee42f 100644 --- a/modules/atheme/atheme.js +++ b/modules/atheme/atheme.js @@ -95,25 +95,20 @@ var atheme = function(dbot) { delete allFlags[u]; } }); - - async.each(_.keys(hostMasks), function(hostMask, done) { + async.each(_.keys(hostMasks), function(hostMask, done) { this.api.getVHosts(event.server, hostMask.split('@')[1], function(err, users) { _.each(users, function(user) { allFlags[user] = hostMasks[hostMask]; }); done(); }); - done(); - }); - }.bind(this), function() { - _.each(this.flagStack[event.server][end[1]].callbacks, function(callback) { - callback(null, this.flagStack[event.server][end[1]].flags); }.bind(this), function() { + console.log('DONE'); _.each(this.flagStack[event.server][end[1]].callbacks, function(callback) { callback(null, this.flagStack[event.server][end[1]].flags); }.bind(this)); delete this.flagStack[event.server][end[1]]; - }.bind(this)); + }.bind(this)); } } } else if(event.user === 'HostServ') {