org.xnap.plugin.opennap.util
Class OpenNapServerVersion
java.lang.Object
org.xnap.plugin.opennap.util.OpenNapServerVersion
public class OpenNapServerVersion
- extends java.lang.Object
This class provides means to parse the version string that is submitted
by most servers on login. This class is used by MessageSender
to send messages that are only supported by specific server
software version.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OPENNAP044
public static final OpenNapServerVersion OPENNAP044
SLAVANAP1
public static final OpenNapServerVersion SLAVANAP1
SLAVANAP2
public static final OpenNapServerVersion SLAVANAP2
UNKNOWN
public static final OpenNapServerVersion UNKNOWN
TOP_VERSIONS
public static final OpenNapServerVersion[] TOP_VERSIONS
software
public java.lang.String software
versions
public int[] versions
nextVersion
public OpenNapServerVersion nextVersion
OpenNapServerVersion
public OpenNapServerVersion(java.lang.String version,
OpenNapServerVersion nextVersion)
OpenNapServerVersion
public OpenNapServerVersion(java.lang.String version)
getClosestVersion
public OpenNapServerVersion getClosestVersion()
- Find a known version that is smaller than ours. That should be
compatible for sure.
getNextVersion
public OpenNapServerVersion getNextVersion()
isOpenNap
public boolean isOpenNap()
isSlavaNap
public boolean isSlavaNap()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
isCompatibleTo
public boolean isCompatibleTo(OpenNapServerVersion v)
- Returns true, if this version is greater or equal than
v
.
parse
protected void parse(java.lang.String version)
Copyright © 2001-2005 XNap Team. All Rights Reserved.