Procházet zdrojové kódy

Merge pull request #117 from csmith/master

Minor inconsequential parser tidying.
pull/118/head
Greg Holmes před 8 roky
rodič
revize
b61894e934
1 změnil soubory, kde provedl 5 přidání a 8 odebrání
  1. 5
    8
      irc/src/com/dmdirc/parser/irc/IRCParser.java

+ 5
- 8
irc/src/com/dmdirc/parser/irc/IRCParser.java Zobrazit soubor

1791
 
1791
 
1792
     @Override
1792
     @Override
1793
     public boolean isUserSettable(final char mode) {
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
      * Set the value of checkServerPing.
1841
      * Set the value of checkServerPing.
1844
      *
1842
      *
1845
      * @param newValue New value to use.
1843
      * @param newValue New value to use.
1846
-     * @see #setCheckServerPing
1847
      */
1844
      */
1848
     public void setCheckServerPing(final boolean newValue) {
1845
     public void setCheckServerPing(final boolean newValue) {
1849
         checkServerPing = newValue;
1846
         checkServerPing = newValue;

Načítá se…
Zrušit
Uložit