messages.put(name.toUpperCase(), this);
}
+ /*
+ * TS6 spec says that if the TS in the message is greater, the
+ * message should be dropped. do that check here. this is here
+ * to mostly support TS checks in TMODE and BMASK without
+ * copy-pasting shit.
+ */
+ protected boolean shouldDropTsMessage(Integer oldTS, String newTS) {
+ try
+ {
+ return (Integer.parseInt(newTS) > oldTS);
+ }
+ catch (NumberFormatException ex)
+ {
+ ex.printStackTrace();
+ return true;
+ }
+ }
+
public void onUser(User source, String[] params) { }
public void onServer(Server source, String[] params) { }
public void on(String source, String[] params) { }