public class DefaultServerInfo extends Object implements ServerInfo.WithManagement
ServerInfo.WithManagement| Constructor and Description |
|---|
DefaultServerInfo(@NonNull Client client)
Constructs the server info.
|
| 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.
|
void |
addISupportParameter(@NonNull ISupportParameter parameter)
Adds an ISUPPORT parameter to the list of supported parameters.
|
@NonNull Optional<String> |
getAddress()
Gets the server-stated address of the server.
|
@NonNull List<ChannelMode> |
getChannelModes()
Gets the channel modes available.
|
@NonNull List<Character> |
getChannelPrefixes()
Gets the list of accepted channel prefixes.
|
@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.
|
@NonNull Map<String,ISupportParameter> |
getISupportParameters()
Gets the ISUPPORT parameters sent to the client.
|
@NonNull Optional<List<String>> |
getMotd()
Gets the server's MOTD.
|
@NonNull Optional<ChannelUserMode> |
getTargetedChannelInfo(@NonNull String name)
Gets the channel user mode for a targeted channel name, such as
+#channel targeting voiced users.
|
@NonNull List<UserMode> |
getUserModes()
Gets the user modes available.
|
@NonNull Optional<String> |
getVersion()
Gets the version of the IRCd.
|
boolean |
isValidChannel(@NonNull String name)
Gets if a given string is a valid channel name according to the
available server information.
|
void |
setAddress(@NonNull String serverAddress)
Sets the server address.
|
void |
setMotd(@NonNull List<String> motd)
Sets the MOTD.
|
void |
setUserModes(@NonNull List<UserMode> userModes)
Sets the user modes.
|
void |
setVersion(@NonNull String version)
Sets the version.
|
@NonNull String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAwayReasonLengthLimit, getCaseMapping, getChannelLengthLimit, getChannelLimits, getChannelMode, getChannelUserMode, getISupportParameter, getKickReasonLengthLimit, getNetworkName, getNickLengthLimit, getTopicLengthLimit, hasWhoXSupportpublic DefaultServerInfo(@NonNull Client client)
client - client for which this manager will operatepublic void addCustomChannelMode(@NonNull ChannelMode mode)
ServerInfoaddCustomChannelMode in interface ServerInfomode - custom mode to supportpublic void addCustomUserMode(@NonNull UserMode mode)
ServerInfoaddCustomUserMode in interface ServerInfomode - custom mode to supportpublic @NonNull Optional<String> getAddress()
ServerInfogetAddress in interface ServerInfopublic void setAddress(@NonNull String serverAddress)
ServerInfo.WithManagementsetAddress in interface ServerInfo.WithManagementserverAddress - server addresspublic @NonNull List<ChannelMode> getChannelModes()
ServerInfogetChannelModes in interface ServerInfopublic @NonNull List<Character> getChannelPrefixes()
ServerInfogetChannelPrefixes in interface ServerInfopublic @NonNull List<ChannelUserMode> getChannelUserModes()
ServerInfogetChannelUserModes in interface ServerInfopublic @NonNull Optional<ISupportParameter> getISupportParameter(@NonNull String name)
ServerInfogetISupportParameter in interface ServerInfoname - parameter name, case insensitivepublic @NonNull Map<String,ISupportParameter> getISupportParameters()
ServerInfogetISupportParameters in interface ServerInfopublic void addISupportParameter(@NonNull ISupportParameter parameter)
ServerInfo.WithManagementaddISupportParameter in interface ServerInfo.WithManagementparameter - parameter to addpublic @NonNull Optional<List<String>> getMotd()
ServerInfogetMotd in interface ServerInfopublic void setMotd(@NonNull List<String> motd)
ServerInfo.WithManagementsetMotd in interface ServerInfo.WithManagementmotd - motdpublic @NonNull Optional<String> getVersion()
ServerInfogetVersion in interface ServerInfopublic void setVersion(@NonNull String version)
ServerInfo.WithManagementsetVersion in interface ServerInfo.WithManagementversion - versionpublic boolean isValidChannel(@NonNull String name)
ServerInfoisValidChannel in interface ServerInfoname - potentially valid namepublic @NonNull Optional<ChannelUserMode> getTargetedChannelInfo(@NonNull String name)
ServerInfo.WithManagementgetTargetedChannelInfo in interface ServerInfo.WithManagementname - channel name with mode tagpublic @NonNull List<UserMode> getUserModes()
ServerInfogetUserModes in interface ServerInfopublic void setUserModes(@NonNull List<UserMode> userModes)
ServerInfo.WithManagementsetUserModes in interface ServerInfo.WithManagementuserModes - user modesCopyright © 2013–2021 Kitteh. All rights reserved.