From: David ‘Bombe’ Roden Date: Wed, 15 Oct 2014 20:30:24 +0000 (+0200) Subject: Show reason if channel can not be joined because the nickname is not registered. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=c82a73fcb36e0304d0d15b554550ff9732287213;p=xudocci.git Show reason if channel can not be joined because the nickname is not registered. --- diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index 70ac0eb..2f89414 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -453,6 +453,8 @@ public class Connection extends AbstractExecutionThreadService implements Servic eventBus.post(new ChannelNotJoined(this, parameters.get(1), Reason.inviteOnly)); } else if (command.equals("475")) { eventBus.post(new ChannelNotJoined(this, parameters.get(1), Reason.badChannelKey)); + } else if (command.equals("477")) { + eventBus.post(new ChannelNotJoined(this, parameters.get(1), Reason.registeredNicknamesOnly)); /* basic connection housekeeping. */ } else if (command.equalsIgnoreCase("PING")) { diff --git a/src/main/java/net/pterodactylus/irc/event/ChannelNotJoined.java b/src/main/java/net/pterodactylus/irc/event/ChannelNotJoined.java index daaeded..fbbd876 100644 --- a/src/main/java/net/pterodactylus/irc/event/ChannelNotJoined.java +++ b/src/main/java/net/pterodactylus/irc/event/ChannelNotJoined.java @@ -37,7 +37,8 @@ public class ChannelNotJoined extends AbstractChannelEvent { noSuchChannel, tooManyChannels, tooManyTargets, - unavailable + unavailable, + registeredNicknamesOnly }