From: David ‘Bombe’ Roden Date: Wed, 10 Apr 2013 04:47:43 +0000 (+0200) Subject: Expose DCC receivers from core. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=1550de41bcf0afcb011e32ab4d737e766ae31618;p=xudocci.git Expose DCC receivers from core. --- 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 //