mirror of
https://github.com/reality/dbot.git
synced 2024-12-27 05:02:36 +01:00
oops
This commit is contained in:
parent
2ea263f997
commit
a378ec7ab4
@ -139,6 +139,19 @@ var commands = function(dbot) {
|
|||||||
network = this.config.network_name[event.server];
|
network = this.config.network_name[event.server];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ban the user from all channels
|
||||||
|
var i = 0;
|
||||||
|
var banChannel = function(channels) {
|
||||||
|
if(i >= channels.length) return;
|
||||||
|
var channel = channels[i];
|
||||||
|
this.api.ban(server, host, channel);
|
||||||
|
this.api.kick(server, banee, channel, reason +
|
||||||
|
' (network-wide ban requested by ' + banner + ')');
|
||||||
|
setTimeout(function() {
|
||||||
|
i++; banChannel(channels);
|
||||||
|
}, 1000);
|
||||||
|
}.bind(this);
|
||||||
|
banChannel(channels);
|
||||||
|
|
||||||
dbot.api.nickserv.getUserHost(event.server, banee, function(host) {
|
dbot.api.nickserv.getUserHost(event.server, banee, function(host) {
|
||||||
// Add host record entry
|
// Add host record entry
|
||||||
@ -221,21 +234,6 @@ var commands = function(dbot) {
|
|||||||
|
|
||||||
// err
|
// err
|
||||||
dbot.say(event.server, 'NickServ', 'FREEZE ' + banee + ' ON ' + reason);
|
dbot.say(event.server, 'NickServ', 'FREEZE ' + banee + ' ON ' + reason);
|
||||||
|
|
||||||
// Ban the user from all channels
|
|
||||||
|
|
||||||
var i = 0;
|
|
||||||
var banChannel = function(channels) {
|
|
||||||
if(i >= channels.length) return;
|
|
||||||
var channel = channels[i];
|
|
||||||
this.api.ban(server, host, channel);
|
|
||||||
this.api.kick(server, banee, channel, reason +
|
|
||||||
' (network-wide ban requested by ' + banner + ')');
|
|
||||||
setTimeout(function() {
|
|
||||||
i++; banChannel(channels);
|
|
||||||
}, 1000);
|
|
||||||
}.bind(this);
|
|
||||||
banChannel(channels);
|
|
||||||
} else {
|
} else {
|
||||||
event.reply(dbot.t('no_user', { 'user': banee }));
|
event.reply(dbot.t('no_user', { 'user': banee }));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user