forked from GitHub/dbot
test
This commit is contained in:
parent
f621fbc38e
commit
01b2d22059
2
jsbot
2
jsbot
@ -1 +1 @@
|
||||
Subproject commit c8bfa1bd838d8ff074c266055e373e63506e647b
|
||||
Subproject commit 14868e9d935bfd39ba698f6c610fc0c049da2b8a
|
@ -68,6 +68,10 @@ var api = function(dbot) {
|
||||
},
|
||||
|
||||
'resolveChannel': function(server, channelName, callback) {
|
||||
if(_.has(this.chanCache[server], channelName)) {
|
||||
return this.api.getChannel(this.chanCache[server][channelName], callback);
|
||||
}
|
||||
|
||||
var channel = false;
|
||||
this.db.search('channel_users', {
|
||||
'server': server,
|
||||
@ -76,9 +80,10 @@ var api = function(dbot) {
|
||||
channel = result;
|
||||
}, function(err) {
|
||||
if(!err) {
|
||||
this.chanCache[server][channelName] = channel.id;
|
||||
callback(channel);
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
'getChannel': function(uuid, callback) {
|
||||
|
@ -11,6 +11,10 @@ var users = function(dbot) {
|
||||
_.each(dbot.config.servers, function(v, k) {
|
||||
this.userCache[k] = {};
|
||||
}.bind(this));
|
||||
this.chanCache = {};
|
||||
_.each(dbot.config.servers, function(v, k) {
|
||||
this.chanCache[k] = {};
|
||||
}.bind(this));
|
||||
|
||||
/*** Internal API ***/
|
||||
this.internalAPI = {
|
||||
|
Loading…
Reference in New Issue
Block a user