forked from GitHub/dbot
fix nunban
This commit is contained in:
parent
7ec7537b7d
commit
c46f5c4f9b
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user