From 164e59defa7d2ac08da7101887e3bcdc3266047f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 13 Apr 2013 12:34:06 +0200 Subject: [PATCH] Show a message when a bot has quit IRC. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()))); + } } /** -- 2.7.4