public interface ServerInfo
Modifier and Type | Interface and Description |
---|---|
static interface |
ServerInfo.WithManagement
A server information provider with management features.
|
Modifier and Type | Method and Description |
---|---|
void |
addCustomChannelMode(@NonNull ChannelMode mode)
Adds a custom channel mode, for a server that doesn't correctly list
modes.
|
void |
addCustomUserMode(@NonNull UserMode mode)
Adds a custom user mode, for a server that doesn't correctly list
modes.
|
@NonNull Optional<String> |
getAddress()
Gets the server-stated address of the server.
|
default int |
getAwayReasonLengthLimit()
Gets the maximum length of away reasons.
|
default @NonNull CaseMapping |
getCaseMapping()
Gets the casemapping for the server.
|
default int |
getChannelLengthLimit()
Gets the maximum length of channel names.
|
default @NonNull Map<Character,Integer> |
getChannelLimits()
Gets the channel join limits.
|
default @NonNull Optional<ChannelMode> |
getChannelMode(char character)
Gets a channel mode by specified character.
|
@NonNull List<ChannelMode> |
getChannelModes()
Gets the channel modes available.
|
@NonNull List<Character> |
getChannelPrefixes()
Gets the list of accepted channel prefixes.
|
default @NonNull Optional<ChannelUserMode> |
getChannelUserMode(char character)
Gets a channel user mode by specified character.
|
@NonNull List<ChannelUserMode> |
getChannelUserModes()
Gets the list of accepted channel user modes, such as op.
|
@NonNull Optional<ISupportParameter> |
getISupportParameter(@NonNull String name)
Gets the named ISUPPORT parameter if present.
|
default <ISupport extends ISupportParameter> |
getISupportParameter(@NonNull String name,
@NonNull Class<ISupport> clazz)
Gets the named ISUPPORT parameter if present and if of the specified
type.
|
@NonNull Map<String,ISupportParameter> |
getISupportParameters()
Gets the ISUPPORT parameters sent to the client.
|
default int |
getKickReasonLengthLimit()
Gets the maximum length of kick reasons.
|
@NonNull Optional<List<String>> |
getMotd()
Gets the server's MOTD.
|
default @NonNull Optional<String> |
getNetworkName()
Gets the name of this network.
|
default int |
getNickLengthLimit()
Gets the maximum length of nicknames.
|
default int |
getTopicLengthLimit()
Gets the maximum length of topics.
|
@NonNull List<UserMode> |
getUserModes()
Gets the user modes available.
|
@NonNull Optional<String> |
getVersion()
Gets the version of the IRCd.
|
default boolean |
hasWhoXSupport()
Gets if the server supports WHOX.
|
boolean |
isValidChannel(@NonNull String name)
Gets if a given string is a valid channel name according to the
available server information.
|
void addCustomChannelMode(@NonNull ChannelMode mode)
mode
- custom mode to supportvoid addCustomUserMode(@NonNull UserMode mode)
mode
- custom mode to support@NonNull Optional<String> getAddress()
default int getAwayReasonLengthLimit()
default @NonNull CaseMapping getCaseMapping()
CaseMapping.RFC1459
default int getChannelLengthLimit()
default @NonNull Map<Character,Integer> getChannelLimits()
default @NonNull Optional<ChannelMode> getChannelMode(char character)
character
- character to match@NonNull List<ChannelMode> getChannelModes()
@NonNull List<Character> getChannelPrefixes()
default @NonNull Optional<ChannelUserMode> getChannelUserMode(char character)
character
- character to match@NonNull List<ChannelUserMode> getChannelUserModes()
@NonNull Optional<ISupportParameter> getISupportParameter(@NonNull String name)
name
- parameter name, case insensitivedefault <ISupport extends ISupportParameter> @NonNull Optional<ISupport> getISupportParameter(@NonNull String name, @NonNull Class<ISupport> clazz)
ISupport
- parameter typename
- parameter name, case insensitiveclazz
- parameter type@NonNull Map<String,ISupportParameter> getISupportParameters()
default int getKickReasonLengthLimit()
default @NonNull Optional<String> getNetworkName()
default int getNickLengthLimit()
default int getTopicLengthLimit()
@NonNull List<UserMode> getUserModes()
@NonNull Optional<String> getVersion()
default boolean hasWhoXSupport()
boolean isValidChannel(@NonNull String name)
name
- potentially valid nameCopyright © 2013–2021 Kitteh. All rights reserved.