mirror of
https://github.com/reality/dbot.git
synced 2024-11-27 14:29:29 +01:00
fix nunban
This commit is contained in:
parent
7ec7537b7d
commit
c46f5c4f9b
@ -204,7 +204,7 @@ var commands = function(dbot) {
|
||||
|
||||
'~nunban': function(event) {
|
||||
var unbanee = event.params[1],
|
||||
unbanner = event.user;
|
||||
unbanner = event.rUser;
|
||||
|
||||
this.api.networkUnban(event.server, unbanee, unbanner, function(err) {
|
||||
if(err) {
|
||||
|
@ -41,16 +41,16 @@ var kick = function(dbot) {
|
||||
var notifyString = dbot.t('nunbanned', {
|
||||
'network': network,
|
||||
'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);
|
||||
|
||||
// Notify Unbanee
|
||||
dbot.say(server, unbanee, dbot.t('nunban_notify', {
|
||||
'network': network,
|
||||
'unbanee': unbanee,
|
||||
'unbanner': unbanner
|
||||
'unbanner': unbanner.currentNick
|
||||
}));
|
||||
|
||||
// Unban
|
||||
@ -68,7 +68,7 @@ var kick = function(dbot) {
|
||||
callback(null); // Success
|
||||
} else {
|
||||
// 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(!_.has(this.hosts, server)) this.hosts[server] = {};
|
||||
this.hosts[server][unbanee] = host;
|
||||
|
Loading…
Reference in New Issue
Block a user