X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fcore%2FCore.java;h=ecf094604041f26c6226db3969ebf09527576aaf;hb=b6ad408e63b624d6dae76c0c622a81574ccc429a;hp=8eea508514b4687bafcd54d6543fde17ec678470;hpb=d2f154dff1ee55b23fab7576a9c50063065d40d4;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 8eea508..ecf0946 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -124,6 +124,27 @@ public class Core extends AbstractIdleService { channels.add(channel); } + /** + * Fetches the given pack from the given bot. + * + * @param bot + * The bot to fetch the pack from + * @param pack + * The pack to fetch + */ + public void fetch(Bot bot, Pack pack) { + Connection connection = networkConnections.get(bot.network()); + if (connection == null) { + return; + } + + try { + connection.sendMessage(bot.name(), "XDCC SEND " + pack.id()); + } catch (IOException ioe1) { + logger.log(Level.WARNING, "Could not send message to bot!", ioe1); + } + } + // // ABSTRACTIDLESERVICE METHODS //