Parse channel types from 005 reply.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 7 Apr 2013 20:47:12 +0000 (22:47 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sun, 7 Apr 2013 20:47:12 +0000 (22:47 +0200)
src/main/java/net/pterodactylus/irc/Connection.java

index 158a7f1..92deeef 100644 (file)
@@ -276,6 +276,7 @@ public class Connection extends AbstractExecutionThreadService implements Servic
 
                        /* server modes. */
                        Map<String, String> nickPrefixes = Maps.newHashMap();
+                       Set<Character> 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));
+                                                       }
                                                }
                                        }