From d49b149690e24825e9a3bc75f9d53094a7b660b4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 11 Apr 2013 07:32:54 +0200 Subject: [PATCH] Store all downloads. --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 4596f0d..8aa31e2 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -43,6 +43,7 @@ import net.pterodactylus.xdcc.core.event.BotAdded; import net.pterodactylus.xdcc.core.event.CoreStarted; import net.pterodactylus.xdcc.data.Bot; import net.pterodactylus.xdcc.data.Channel; +import net.pterodactylus.xdcc.data.Download; import net.pterodactylus.xdcc.data.Network; import net.pterodactylus.xdcc.data.Pack; import net.pterodactylus.xdcc.data.Server; @@ -93,6 +94,9 @@ public class Core extends AbstractIdleService { /** The currently known bots. */ private final Table networkBots = HashBasedTable.create(); + /** The current downloads. */ + private final Map downloads = Maps.newHashMap(); + /** The current DCC receivers. */ private final Collection dccReceivers = Sets.newHashSet(); @@ -191,6 +195,9 @@ public class Core extends AbstractIdleService { return; } + Download download = new Download(bot, pack); + downloads.put(pack.name(), download); + try { connection.sendMessage(bot.name(), "XDCC SEND " + pack.id()); } catch (IOException ioe1) { -- 2.7.4