import static java.lang.String.format;
import static net.pterodactylus.irc.event.ChannelNotJoined.Reason.banned;
+import static net.pterodactylus.irc.event.ChannelNotJoined.Reason.inviteOnly;
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;
format("Not trying to join %s anymore.", channel.get())));
return;
}
+ if (channelNotJoined.reason() == inviteOnly) {
+ channelBanManager.ban(channel.get());
+ eventBus.post(new GenericMessage(
+ format("%s is invite-only, suspending join for a day.",
+ channel.get())));
+ return;
+ }
if (channelNotJoined.reason() == banned) {
channelBanManager.ban(channel.get());
eventBus.post(new GenericMessage(