fix nunban

This commit is contained in:
reality 2013-09-07 23:02:04 +00:00
parent 7ec7537b7d
commit c46f5c4f9b
2 changed files with 5 additions and 5 deletions

View File

@ -204,7 +204,7 @@ var commands = function(dbot) {
'~nunban': function(event) { '~nunban': function(event) {
var unbanee = event.params[1], var unbanee = event.params[1],
unbanner = event.user; unbanner = event.rUser;
this.api.networkUnban(event.server, unbanee, unbanner, function(err) { this.api.networkUnban(event.server, unbanee, unbanner, function(err) {
if(err) { if(err) {

View File

@ -41,16 +41,16 @@ var kick = function(dbot) {
var notifyString = dbot.t('nunbanned', { var notifyString = dbot.t('nunbanned', {
'network': network, 'network': network,
'unbanee': unbanee, 'unbanee': unbanee,
'unbanner': unbanner 'unbanner': unbanner.currentNick
}); });
dbot.api.report.notify('unban', server, unbanee, adminChannel, notifyString); dbot.api.report.notify('unban', server, unbanner, adminChannel, notifyString);
dbot.say(server, adminChannel, notifyString); dbot.say(server, adminChannel, notifyString);
// Notify Unbanee // Notify Unbanee
dbot.say(server, unbanee, dbot.t('nunban_notify', { dbot.say(server, unbanee, dbot.t('nunban_notify', {
'network': network, 'network': network,
'unbanee': unbanee, 'unbanee': unbanee,
'unbanner': unbanner 'unbanner': unbanner.currentNick
})); }));
// Unban // Unban
@ -68,7 +68,7 @@ var kick = function(dbot) {
callback(null); // Success callback(null); // Success
} else { } else {
// Attempt to look up the host on-the-fly // Attempt to look up the host on-the-fly
dbot.api.nickserv.getUserHost(server, unbanee, function(host) { dbot.api.nickserv.getUserHost(server, unbanee, unbanner, function(host) {
if(host) { if(host) {
if(!_.has(this.hosts, server)) this.hosts[server] = {}; if(!_.has(this.hosts, server)) this.hosts[server] = {};
this.hosts[server][unbanee] = host; this.hosts[server][unbanee] = host;