From 073337dd8309e3d6e2cf57b9a763de7de679a6a9 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:50 +0200 Subject: [PATCH] Show a message when a bot has left a channel. --- 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 5485ed4..dce8da3 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -343,7 +343,10 @@ public class Core extends AbstractIdleService { return; } - networkBots.remove(network.get(), channelLeft.client().nick().get()); + Bot removedBot = networkBots.remove(network.get(), channelLeft.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