From 99f3d9c7383ea129c79e0d2c6b35189fa874d892 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 5 Feb 2024 19:19:43 +0100 Subject: [PATCH 1/1] =?utf8?q?=F0=9F=94=A5=20Remove=20debug=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 98bd158..ff7a4e1 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -892,33 +892,28 @@ public class Core extends AbstractExecutionThreadService { if (!network.isPresent()) { return; } - eventBus.post(new GenericMessage("a")); Set openDownloads = downloads.values().stream() .filter(download -> download.bot().name().equalsIgnoreCase(dccSendReceived.source().nick().orNull())) .filter(download -> download.dccReceiver() == null) .collect(toSet()); - eventBus.post(new GenericMessage("b")); if (openDownloads.isEmpty()) { /* I don't think we requested this. */ eventBus.post(new GenericMessage(format("Ignoring offer for %s, no open download from %s.", dccSendReceived.filename(), dccSendReceived.source()))); return; } - eventBus.post(new GenericMessage("c")); /* check if it’s already downloading. */ if (downloads.values().stream().anyMatch(download -> Objects.equals(download.filename(), dccSendReceived.filename()) && download.dccReceiver() != null)) { eventBus.post(new GenericMessage(format("Ignoring offer for %s, it’s already being downloaded.", dccSendReceived.filename()))); return; } - eventBus.post(new GenericMessage("d")); Download download = openDownloads.stream() .filter(it -> Objects.equals(it.filename(), dccSendReceived.filename())) .findFirst() .orElse(openDownloads.iterator().next()); - eventBus.post(new GenericMessage("e")); eventBus.post(new GenericMessage(format("Downloading %s from %s as %s.", dccSendReceived.filename(), dccSendReceived.source(), download.pack().name()))); /* check if the file already exists. */ -- 2.7.4