package net.pterodactylus.xdcc.core;
import static java.lang.String.format;
+import static net.pterodactylus.irc.event.ChannelNotJoined.Reason.registeredNicknamesOnly;
import static net.pterodactylus.irc.util.MessageCleaner.getDefaultInstance;
import static net.pterodactylus.xdcc.data.Channel.TO_NETWORK;
import static net.pterodactylus.xdcc.data.Download.FILTER_RUNNING;
return;
}
+ if (channelNotJoined.reason() == registeredNicknamesOnly) {
+ Optional<Channel> 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());
+ }
+ return;
+ }
+
eventBus.post(new GenericMessage(
format("Could not join %s: %s", channelNotJoined.channel(),
channelNotJoined.reason())));