From 2ea263f9972ffa6cf8c71057f5e7bcc71120a075 Mon Sep 17 00:00:00 2001 From: reality Date: Tue, 27 Oct 2015 19:30:32 +0000 Subject: [PATCH] oops --- modules/kick/commands.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules/kick/commands.js b/modules/kick/commands.js index 5a719c1..7c9fa87 100644 --- a/modules/kick/commands.js +++ b/modules/kick/commands.js @@ -139,15 +139,16 @@ var commands = function(dbot) { network = this.config.network_name[event.server]; } - // Ban from current channel first - this.api.ban(server, host, event.channel); - this.api.kick(server, banee, event.channel, reason + - ' (network-wide ban requested by ' + banner + ')'); - channels = _.without(channels, event.channel); dbot.api.nickserv.getUserHost(event.server, banee, function(host) { // Add host record entry if(host) { + // Ban from current channel first + this.api.ban(server, host, event.channel); + this.api.kick(server, banee, event.channel, reason + + ' (network-wide ban requested by ' + banner + ')'); + channels = _.without(channels, event.channel); + this.hosts[event.server][banee] = host; // Create notify string