From: David ‘Bombe’ Roden Date: Sat, 13 Apr 2013 10:34:06 +0000 (+0200) Subject: Show a message when a bot has quit IRC. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=164e59defa7d2ac08da7101887e3bcdc3266047f;p=xudocci.git Show a message when a bot has quit IRC. --- diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 251310e..5485ed4 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -359,7 +359,10 @@ public class Core extends AbstractIdleService { return; } - networkBots.remove(network.get(), clientQuit.client().nick().get()); + Bot removedBot = networkBots.remove(network.get(), clientQuit.client().nick().get()); + if (removedBot != null) { + eventBus.post(new GenericMessage(String.format("Bot %s (%s) was removed, %d packs removed.", removedBot.name(), removedBot.network().name(), removedBot.packs().size()))); + } } /**