3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-27 22:39:26 +01:00

properly resolve unbans

This commit is contained in:
reality 2015-07-22 23:21:56 +00:00
parent d5b35a7b13
commit b82a3e72ff

View File

@ -91,11 +91,13 @@ var kick = function(dbot) {
this.internalAPI = { this.internalAPI = {
'addTempBan': function(server, banee, timeout) { 'addTempBan': function(server, banee, timeout) {
dbot.api.users.resolveUser(server, dbot.config.name, function(err, bot) {
dbot.api.timers.addTimeout(timeout, function() { dbot.api.timers.addTimeout(timeout, function() {
this.api.networkUnban(server, banee, dbot.config.name, function(err) {}); this.api.networkUnban(server, banee, bot, function(err) {});
delete this.tempBans[server][banee]; delete this.tempBans[server][banee];
}.bind(this)); }.bind(this));
}.bind(this) }.bind(this));
}.bind(this);
}; };
this.listener = function(event) { this.listener = function(event) {