X-Git-Url: https://git.pterodactylus.net/?p=xudocci.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fcore%2FCore.java;h=b020c1a74edc045d2db8cf46dbb220fb625be016;hp=e24fa2ff3aeafae29df0b5601c2538b1fe48b64e;hb=2769f52b856c2ebb1ec06836ca81591b7e99a4ba;hpb=fd78c0b99be170906ab7954ccd59916566803c57 diff --git a/src/main/java/net/pterodactylus/xdcc/core/Core.java b/src/main/java/net/pterodactylus/xdcc/core/Core.java index e24fa2f..b020c1a 100644 --- a/src/main/java/net/pterodactylus/xdcc/core/Core.java +++ b/src/main/java/net/pterodactylus/xdcc/core/Core.java @@ -19,6 +19,7 @@ package net.pterodactylus.xdcc.core; 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; @@ -660,6 +661,13 @@ public class Core extends AbstractExecutionThreadService { 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(