From: David ‘Bombe’ Roden Date: Sun, 7 Apr 2013 20:47:12 +0000 (+0200) Subject: Parse channel types from 005 reply. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=dee8fa734215a443bd279556cb084dfba845175b;p=xudocci.git Parse channel types from 005 reply. --- 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)); + } } }