From: David ‘Bombe’ Roden Date: Fri, 17 Oct 2014 07:56:58 +0000 (+0200) Subject: Simplify code. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f5fcfe1bbd91b46e873a870a0548349002a0c626;p=xudocci.git Simplify code. --- diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index 8670924..68628d7 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -564,11 +564,9 @@ public class Core extends AbstractExecutionThreadService { } if (channelNotJoined.reason() == registeredNicknamesOnly) { - Optional channel = getChannel(network.get(), channelNotJoined.channel()); - if (channel.isPresent()) { - eventBus.post(new GenericMessage(format("Not trying to join %s anymore.", channel.get()))); - channels.remove(channel.get()); - } + channels.remove(channel.get()); + eventBus.post(new GenericMessage( + format("Not trying to join %s anymore.", channel.get()))); return; } if (channelNotJoined.reason() == banned) {