X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fui%2Fstdin%2FCommandReader.java;h=37149562faa48c0c86c14df2dfe27f9cb774ce7f;hb=5a07d92f9e4b871f1e2b8beab56e52ed35d9d44c;hp=26696f9ab3ba2208e6f8ef125bcd4c48d841cd6c;hpb=17ab500f0e0e366f509bbdf3891ad2c53ea74d7e;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java b/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java index 26696f9..3714956 100644 --- a/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java +++ b/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java @@ -155,6 +155,11 @@ public class CommandReader extends AbstractExecutionThreadService { if ((index != null) && (index < lastResult.size())) { core.fetch(lastResult.get(index).bot(), lastResult.get(index).pack()); } + } else if (words[0].equalsIgnoreCase("cancel")) { + Integer index = Ints.tryParse(words[1]); + if ((index != null) && (index < lastResult.size())) { + core.cancelDownload(lastResult.get(index).bot(), lastResult.get(index).pack()); + } } else if (words[0].equalsIgnoreCase("stats")) { int configuredChannelsCount = core.channels().size(); int joinedChannelsCount = core.joinedChannels().size();