From 1550de41bcf0afcb011e32ab4d737e766ae31618 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 10 Apr 2013 06:47:43 +0200 Subject: [PATCH] Expose DCC receivers from core. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 5df7f42..8eea508 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -28,6 +28,7 @@ import java.util.logging.Logger; import net.pterodactylus.irc.Connection; import net.pterodactylus.irc.ConnectionBuilder; +import net.pterodactylus.irc.DccReceiver; import net.pterodactylus.irc.event.ChannelMessageReceived; import net.pterodactylus.irc.event.ConnectionEstablished; import net.pterodactylus.irc.util.MessageCleaner; @@ -73,6 +74,9 @@ public class Core extends AbstractIdleService { /** The currently known bots. */ private final Table networkBots = HashBasedTable.create(); + /** The current DCC receivers. */ + private final Collection dccReceivers = Sets.newHashSet(); + /** * Creates a new core. * @@ -97,6 +101,15 @@ public class Core extends AbstractIdleService { return networkBots.values(); } + /** + * Returns the currently active DCC receivers. + * + * @return The currently active DCC receivers + */ + public Collection dccReceivers() { + return dccReceivers; + } + // // ACTIONS // -- 2.7.4