From c9aed227f82c103fefe81355ebff9dfbe2c6ef53 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 17 Oct 2014 09:56:48 +0200 Subject: [PATCH] =?utf8?q?Log=20message=20if=20we=20failed=20to=20join=20a?= =?utf8?q?=20channel=20we=20didn=E2=80=99t=20try=20to=20join=20in=20the=20?= =?utf8?q?first=20place.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/xdcc/core/Core.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 5bcccf3..8670924 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -557,6 +557,12 @@ public class Core extends AbstractExecutionThreadService { return; } + Optional channel = getChannel(network.get(), channelNotJoined.channel()); + if (!channel.isPresent()) { + eventBus.post(new GenericMessage(format("Could not join %s but didn’t try to join, either.", channel.get()))); + return; + } + if (channelNotJoined.reason() == registeredNicknamesOnly) { Optional channel = getChannel(network.get(), channelNotJoined.channel()); if (channel.isPresent()) { -- 2.7.4