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);