projects
/
xudocci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Treat all reasons for not being able to join a channel equally.
[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
00d1fbd
..
5ec21cf
100644
(file)
--- a/
src/main/java/net/pterodactylus/xdcc/core/Core.java
+++ b/
src/main/java/net/pterodactylus/xdcc/core/Core.java
@@
-658,30
+658,23
@@
public class Core extends AbstractExecutionThreadService {
.forEach(bot -> networkBots.row(network.get())
.remove(bot.name()));
.forEach(bot -> networkBots.row(network.get())
.remove(bot.name()));
+ channelBanManager.ban(channel.get());
if (channelNotJoined.reason() == registeredNicknamesOnly) {
if (channelNotJoined.reason() == registeredNicknamesOnly) {
- channels.remove(channel.get());
eventBus.post(new GenericMessage(
format("Not trying to join %s anymore.", channel.get())));
eventBus.post(new GenericMessage(
format("Not trying to join %s anymore.", channel.get())));
- return;
- }
- if (channelNotJoined.reason() == inviteOnly) {
- channelBanManager.ban(channel.get());
+ } else if (channelNotJoined.reason() == inviteOnly) {
eventBus.post(new GenericMessage(
format("%s is invite-only, suspending join for a day.",
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());
+ } else if (channelNotJoined.reason() == banned) {
eventBus.post(new GenericMessage(
format("Banned from %s, suspending join for a day.",
channel.get())));
eventBus.post(new GenericMessage(
format("Banned from %s, suspending join for a day.",
channel.get())));
- return;
+ } else {
+ eventBus.post(new GenericMessage(
+ format("Could not join %s: %s", channelNotJoined.channel(),
+ channelNotJoined.reason())));
}
}
-
- eventBus.post(new GenericMessage(
- format("Could not join %s: %s", channelNotJoined.channel(),
- channelNotJoined.reason())));
}
/**
}
/**