Show reason if channel can not be joined because the nickname is not registered.
[xudocci.git] / src / main / java / net / pterodactylus / irc / Connection.java
index 70ac0eb..2f89414 100644 (file)
@@ -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")) {