From dee8fa734215a443bd279556cb084dfba845175b Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 7 Apr 2013 22:47:12 +0200 Subject: [PATCH] Parse channel types from 005 reply. --- src/main/java/net/pterodactylus/irc/Connection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/net/pterodactylus/irc/Connection.java b/src/main/java/net/pterodactylus/irc/Connection.java index 158a7f1..92deeef 100644 --- a/src/main/java/net/pterodactylus/irc/Connection.java +++ b/src/main/java/net/pterodactylus/irc/Connection.java @@ -276,6 +276,7 @@ public class Connection extends AbstractExecutionThreadService implements Servic /* server modes. */ Map nickPrefixes = Maps.newHashMap(); + Set channelTypes = Sets.newHashSet(); while (connected) { Reply reply = connectionHandler.readReply(); @@ -306,6 +307,10 @@ public class Connection extends AbstractExecutionThreadService implements Servic nickPrefixes.put(String.valueOf(modeSymbol), String.valueOf(modeCharacter)); } } + } else if (parameter.startsWith("CHANTYPES=")) { + for (int typeIndex = 10; typeIndex < parameter.length(); ++typeIndex) { + channelTypes.add(parameter.charAt(typeIndex)); + } } } -- 2.7.4