]> jfr.im git - irc/rizon/acid.git/commitdiff
make hashsets for banlike modes final and add support for +I
authorchristinaa <redacted>
Wed, 30 Aug 2017 00:13:15 +0000 (17:13 -0700)
committerchristinaa <redacted>
Wed, 30 Aug 2017 00:13:15 +0000 (17:13 -0700)
acid/src/main/java/net/rizon/acid/core/Channel.java

index 4ecf32ecbb939bbd798de88c6878578d4af8d94d..24e8a038d7fca448d7d186d9e342bbbb72f67882 100644 (file)
@@ -23,11 +23,11 @@ public class Channel
 
        /*
         * support for ban-like modes (as the TS6 spec calls them) that include
-        * a mask with them. only handle those for now, stuff like +I can be added
-        * easily if it's needed.
+        * a mask with them. (+b/+e/+I)
         */
-       private HashSet<String> modesBans = new HashSet<String>();
-       private HashSet<String> modesExempt = new HashSet<String>();
+       private final HashSet<String> modesBans = new HashSet<String>();
+       private final HashSet<String> modesExempt = new HashSet<String>();
+       private final HashSet<String> modesInvEx = new HashSet<String>();
 
        public Channel(String channel, int ts)
        {
@@ -125,6 +125,8 @@ public class Channel
                        set = modesBans;
                else if (mode == 'e')
                        set = modesExempt;
+               else if (mode == 'I')
+                       set = modesInvEx;
                else
                        return;
 
@@ -144,6 +146,11 @@ public class Channel
                return modesExempt;
        }
 
+       public Set<String> getInvEx()
+       {
+               return modesInvEx;
+       }
+
        public String getKey()
        {
                return key;