From ddec929b6f001d3454f16133bf47fec7db371275 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 10 Apr 2013 08:23:09 +0200 Subject: [PATCH] Expose currently joined channels. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index e417f83..de4c842 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -74,6 +74,9 @@ public class Core extends AbstractIdleService { /** The channels that should be monitored. */ private final Collection channels = Sets.newHashSet(); + /** The channels that are currentlymonitored. */ + private final Collection joinedChannels = Sets.newHashSet(); + /** The current network connections. */ private final Map networkConnections = Collections.synchronizedMap(Maps.newHashMap()); @@ -109,6 +112,15 @@ public class Core extends AbstractIdleService { } /** + * Returns all currently joined channels. + * + * @return All currently joined channels + */ + public Collection joinedChannels() { + return ImmutableSet.copyOf(joinedChannels); + } + + /** * Returns all currently known bots. * * @return All currently known bots -- 2.7.4