]> jfr.im git - irc/rizon/acid.git/commitdiff
shouldDropTsMessage has been factored out so get rid of it here
authorchristinaa <redacted>
Tue, 29 Aug 2017 18:16:14 +0000 (12:16 -0600)
committerchristinaa <redacted>
Tue, 29 Aug 2017 18:16:14 +0000 (12:16 -0600)
acid/src/main/java/net/rizon/acid/messages/BMask.java

index 7cfd57029256ab5ea6982c15f37ead4fdfb91894..c4cbc2f102b52962380c78cd58ebadd00f3e3929 100644 (file)
@@ -25,27 +25,11 @@ public class BMask extends Message
                super("BMASK");
        }
 
-       /*
-        * TS6 spec says that if the TS in the BMASK is greater, the message
-        * should be dropped. do that check here.
-        */
-       private boolean shouldDropMessage(Channel chan, String newTS) {
-               try
-               {
-                       return (Integer.parseInt(newTS) > chan.getTS());
-               }
-               catch (NumberFormatException ex)
-               {
-                       ex.printStackTrace();
-                       return true;
-               }
-       }
-
        @Override
        public void onServer(Server server, String[] params)
        {
                Channel chan = Channel.findChannel(params[1]);
-               if (chan == null || shouldDropMessage(chan, params[0]))
+               if (chan == null || shouldDropTsMessage(chan.getTS(), params[0]))
                        return;
 
                char mode = params[2].charAt(0);