Browse Source

Minor inconsequential parser tidying.

pull/117/head
Chris Smith 8 years ago
parent
commit
f0dc1ed505
1 changed files with 5 additions and 8 deletions
  1. 5
    8
      irc/src/com/dmdirc/parser/irc/IRCParser.java

+ 5
- 8
irc/src/com/dmdirc/parser/irc/IRCParser.java View File

@@ -1791,13 +1791,11 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
1791 1791
 
1792 1792
     @Override
1793 1793
     public boolean isUserSettable(final char mode) {
1794
-        final String validmodes;
1795
-        if (h005Info.containsKey(IrcConstants.ISUPPORT_USER_CHANNEL_MODES)) {
1796
-            validmodes = h005Info.get(IrcConstants.ISUPPORT_USER_CHANNEL_MODES);
1797
-        } else {
1798
-            validmodes = "bklimnpstrc";
1799
-        }
1800
-        return validmodes.matches(".*" + mode + ".*");
1794
+        final String validmodes =
1795
+                h005Info.containsKey(IrcConstants.ISUPPORT_USER_CHANNEL_MODES)
1796
+                        ? h005Info.get(IrcConstants.ISUPPORT_USER_CHANNEL_MODES)
1797
+                        : "bklimnpstrc";
1798
+        return validmodes.indexOf(mode) > -1;
1801 1799
     }
1802 1800
 
1803 1801
     /**
@@ -1843,7 +1841,6 @@ public class IRCParser extends BaseSocketAwareParser implements SecureParser, En
1843 1841
      * Set the value of checkServerPing.
1844 1842
      *
1845 1843
      * @param newValue New value to use.
1846
-     * @see #setCheckServerPing
1847 1844
      */
1848 1845
     public void setCheckServerPing(final boolean newValue) {
1849 1846
         checkServerPing = newValue;

Loading…
Cancel
Save