From: David ‘Bombe’ Roden Date: Fri, 17 Oct 2014 07:56:48 +0000 (+0200) Subject: Log message if we failed to join a channel we didn’t try to join in the first place. X-Git-Url: https://git.pterodactylus.net/?p=xudocci.git;a=commitdiff_plain;h=c9aed227f82c103fefe81355ebff9dfbe2c6ef53 Log message if we failed to join a channel we didn’t try to join in the first place. --- 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()) {