jerklib
Class ServerInformation

java.lang.Object
  extended by jerklib.ServerInformation

public class ServerInformation
extends Object

This class allows you to probe various pieces of information about the server. For more information see this and this. These documents will explain all the pieces of information provided through this class.

Author:
Jason Davis

Nested Class Summary
static class ServerInformation.ModeType
           Type A: Modes that must add or remove an address to or from a list.
 
Constructor Summary
ServerInformation()
           
 
Method Summary
 String getCaseMapping()
          Get the case mapping used by this server.
Will be one of the following: ascii, rfc1459, or strict-rfc1459
 int getChannelJoinLimitForPrefix(String prefix)
          Used to indicate the maximum amount of channels that a client may join of a given prefix.
 String[] getChannelPrefixes()
          Get the channel prefixes
 String getIrcdString()
          Get the IRCD String (this will usually be the name of the ircd.
 int getMaxAwayLength()
          Get the maximum away message length
 int getMaxChannelNameLength()
          Get the max channel Name Lengt
 int getMaxHostLength()
          Get the maximum Hostname length
 int getMaxKeyLength()
          Get the max channel key length
 int getMaxKickLength()
          Get max kick message length
 int getMaxModesPerCommnad()
          Get the maximum number of modes per command
 int getMaxNickLength()
          Get the max nick length.
 int getMaxSilenceListSize()
          Get the maximum silence list length
 int getMaxTopicLength()
          Get the max topic length
 int getMaxUserLength()
          Get the max username length
 String[] getModes(ServerInformation.ModeType type)
          Get all modes of the given ServerInformation.ModeType.
 List<String> getNickPrefixes()
          Get the nickPrefixes.
 Map<String,String> getNickPrefixMap()
          Get The nickprefixes supported
 String getServerName()
          Get the server name
 String[] getStatusPrefixes()
          The status prefixes supported
 String[] getSupportedChannelModes()
          Retrieve all supported channel modes.
 ServerInformation.ModeType getTypeForMode(String mode)
          Get the ServerInformation.ModeType for the given mode.
 void parseServerInfo(String rawData)
           
 boolean supportsBanExceptions()
          Get whether or not the server supports ban exceptions
 boolean supportsCAPAB()
          Get whether or not the server supports CAPAB
 boolean supportsCNotice()
          Get whether or not CNOTICE are supported by the server.
 boolean supportsCPrivMsg()
          Get whether or not the server supports CPRIVMSG
 boolean supportsEtrace()
          Get whether or not ETRACE is supported.
 boolean supportsInviteExceptions()
          Get whether or not Invite Exceptions are supported.
 boolean supportsKnock()
          Get whether or not KNOCK is supported.
 boolean supportsNickPrefixes()
          Get Whether or not nick prefixes are supported.
 boolean supportsSafeList()
          Get whether or not SAFELIST is supported.
 boolean supportsSilenceList()
          Whether or not SILENCE list is supported
 boolean supportsStatusNotices()
          Get whether or not status notices are supported.
 boolean supportsUserIp()
          Get Whether or not USERIP is supported.
 boolean supportsWallChops()
          Get if WALLCHOPS is supported.
 boolean supportsWallVoices()
          Get whether or not WALLVOICES is supported.
 boolean supportsWhox()
          Get whether or not WHOX is supported,
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerInformation

public ServerInformation()
Method Detail

parseServerInfo

public void parseServerInfo(String rawData)

getModes

public String[] getModes(ServerInformation.ModeType type)
Get all modes of the given ServerInformation.ModeType.

Parameters:
type - - the mode type
Returns:
an array containing all modes of the given type.
See Also:
ServerInformation.ModeType

getTypeForMode

public ServerInformation.ModeType getTypeForMode(String mode)
Get the ServerInformation.ModeType for the given mode.

Parameters:
mode - the mode
Returns:
the ServerInformation.ModeType.
See Also:
ServerInformation.ModeType

getServerName

public String getServerName()
Get the server name

Returns:
the name of the server

getIrcdString

public String getIrcdString()
Get the IRCD String (this will usually be the name of the ircd.

Returns:
the IRCD string.

getCaseMapping

public String getCaseMapping()
Get the case mapping used by this server.
Will be one of the following: ascii, rfc1459, or strict-rfc1459

Returns:
the case mapping used by the server

getChannelJoinLimitForPrefix

public int getChannelJoinLimitForPrefix(String prefix)
Used to indicate the maximum amount of channels that a client may join of a given prefix. A commen example prefix would be #

Parameters:
prefix - the channel prefix
Returns:
the maximum join limit for the given channel prefix

getSupportedChannelModes

public String[] getSupportedChannelModes()
Retrieve all supported channel modes.

Returns:
the supported channel modes

supportsCAPAB

public boolean supportsCAPAB()
Get whether or not the server supports CAPAB

Returns:
whether or not the server support CAPAB

supportsCNotice

public boolean supportsCNotice()
Get whether or not CNOTICE are supported by the server.

Returns:
whether or not CNOTICE is supported by the server

supportsCPrivMsg

public boolean supportsCPrivMsg()
Get whether or not the server supports CPRIVMSG

Returns:
whether or not the server supports CPRIVMSG

supportsWhox

public boolean supportsWhox()
Get whether or not WHOX is supported,

Returns:
whether or not WHOX is supported.

supportsWallChops

public boolean supportsWallChops()
Get if WALLCHOPS is supported.

Returns:
whether or not WALLCHOPS is supported.

supportsWallVoices

public boolean supportsWallVoices()
Get whether or not WALLVOICES is supported.

Returns:
whether or not WALLVOICES is supported.

supportsBanExceptions

public boolean supportsBanExceptions()
Get whether or not the server supports ban exceptions

Returns:
whether or not server supports ban exceptions.

supportsInviteExceptions

public boolean supportsInviteExceptions()
Get whether or not Invite Exceptions are supported.

Returns:
whether or not invite are supported.

supportsKnock

public boolean supportsKnock()
Get whether or not KNOCK is supported.

Returns:
whether or not KNOCK is supported

supportsUserIp

public boolean supportsUserIp()
Get Whether or not USERIP is supported.

Returns:
whether or not USERIP is supported.

supportsEtrace

public boolean supportsEtrace()
Get whether or not ETRACE is supported.

Returns:
whether or not ETRACE is supported.

supportsSafeList

public boolean supportsSafeList()
Get whether or not SAFELIST is supported.

Returns:
whether or not SAFELIST is supported.

supportsSilenceList

public boolean supportsSilenceList()
Whether or not SILENCE list is supported

Returns:
whether or not the SILENCE list is supported

supportsNickPrefixes

public boolean supportsNickPrefixes()
Get Whether or not nick prefixes are supported.

Returns:
whether or not nick prefixes are supported.

supportsStatusNotices

public boolean supportsStatusNotices()
Get whether or not status notices are supported.

Returns:
whether or not status notices are supported.

getMaxModesPerCommnad

public int getMaxModesPerCommnad()
Get the maximum number of modes per command

Returns:
Maximum of number of modes per command.

getMaxAwayLength

public int getMaxAwayLength()
Get the maximum away message length

Returns:
max away message length

getMaxKickLength

public int getMaxKickLength()
Get max kick message length

Returns:
get the max kick msg length

getMaxNickLength

public int getMaxNickLength()
Get the max nick length.

Returns:
max nick length

getMaxSilenceListSize

public int getMaxSilenceListSize()
Get the maximum silence list length

Returns:
max length of the silence list

getMaxTopicLength

public int getMaxTopicLength()
Get the max topic length

Returns:
max topic length

getMaxChannelNameLength

public int getMaxChannelNameLength()
Get the max channel Name Lengt

Returns:
max channel name length

getMaxKeyLength

public int getMaxKeyLength()
Get the max channel key length

Returns:
max channel key length

getMaxHostLength

public int getMaxHostLength()
Get the maximum Hostname length

Returns:
max hostname length

getMaxUserLength

public int getMaxUserLength()
Get the max username length

Returns:
max username length

getNickPrefixes

public List<String> getNickPrefixes()
Get the nickPrefixes.

Returns:
the nick prefixes

getNickPrefixMap

public Map<String,String> getNickPrefixMap()
Get The nickprefixes supported

Returns:
the nick prefixes

getStatusPrefixes

public String[] getStatusPrefixes()
The status prefixes supported

Returns:
the supported status prefixes

getChannelPrefixes

public String[] getChannelPrefixes()
Get the channel prefixes

Returns:
the channel prefixes supported on the server