From: David ‘Bombe’ Roden Date: Wed, 10 Apr 2013 06:23:09 +0000 (+0200) Subject: Expose currently joined channels. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ddec929b6f001d3454f16133bf47fec7db371275;hp=a2f24c9ca57a37988917bb8679cdf29ff2008294;p=xudocci.git Expose currently joined channels. --- 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