projects
/
xudocci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Treat invite-only channels as banned.
[xudocci.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
xdcc
/
core
/
Core.java
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
(file)
--- 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 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;
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;
}
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(
if (channelNotJoined.reason() == banned) {
channelBanManager.ban(channel.get());
eventBus.post(new GenericMessage(