public class DefaultServerInfo extends Object implements ServerInfo.WithManagement
ServerInfo.WithManagement| Constructor and Description |
|---|
DefaultServerInfo(Client client)
Constructs the server info.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addISupportParameter(ISupportParameter parameter)
Adds an ISUPPORT parameter to the list of supported parameters.
|
Optional<String> |
getAddress()
Gets the server-stated address of the server.
|
List<ChannelMode> |
getChannelModes()
Gets the channel modes available.
|
List<Character> |
getChannelPrefixes()
Gets the list of accepted channel prefixes.
|
List<ChannelUserMode> |
getChannelUserModes()
Gets the list of accepted channel user modes, such as op.
|
Optional<ISupportParameter> |
getISupportParameter(String name)
Gets the named ISUPPORT parameter if present.
|
Map<String,ISupportParameter> |
getISupportParameters()
Gets the ISUPPORT parameters sent to the client.
|
Optional<List<String>> |
getMotd()
Gets the server's MOTD.
|
Optional<ChannelUserMode> |
getTargetedChannelInfo(String name)
Gets the channel user mode for a targeted channel name, such as
+#channel targeting voiced users.
|
List<UserMode> |
getUserModes()
Gets the user modes available.
|
Optional<String> |
getVersion()
Gets the version of the IRCd.
|
boolean |
isValidChannel(String name)
Gets if a given string is a valid channel name according to the
available server information.
|
void |
setAddress(String serverAddress)
Sets the server address.
|
void |
setMotd(List<String> motd)
Sets the MOTD.
|
void |
setUserModes(List<UserMode> userModes)
Sets the user modes.
|
void |
setVersion(String version)
Sets the version.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCaseMapping, getChannelLengthLimit, getChannelLimits, getChannelMode, getChannelUserMode, getISupportParameter, getNetworkName, getNickLengthLimit, hasWhoXSupport@Nonnull public Optional<String> getAddress()
ServerInfogetAddress in interface ServerInfopublic void setAddress(@Nonnull String serverAddress)
ServerInfo.WithManagementsetAddress in interface ServerInfo.WithManagementserverAddress - server address@Nonnull public List<ChannelMode> getChannelModes()
ServerInfogetChannelModes in interface ServerInfo@Nonnull public List<Character> getChannelPrefixes()
ServerInfogetChannelPrefixes in interface ServerInfo@Nonnull public List<ChannelUserMode> getChannelUserModes()
ServerInfogetChannelUserModes in interface ServerInfo@Nonnull public Optional<ISupportParameter> getISupportParameter(@Nonnull String name)
ServerInfogetISupportParameter in interface ServerInfoname - parameter name, case insensitive@Nonnull public Map<String,ISupportParameter> getISupportParameters()
ServerInfogetISupportParameters in interface ServerInfopublic void addISupportParameter(@Nonnull ISupportParameter parameter)
ServerInfo.WithManagementaddISupportParameter in interface ServerInfo.WithManagementparameter - parameter to add@Nonnull public Optional<List<String>> getMotd()
ServerInfogetMotd in interface ServerInfopublic void setMotd(@Nonnull List<String> motd)
ServerInfo.WithManagementsetMotd in interface ServerInfo.WithManagementmotd - motd@Nonnull public 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 name@Nonnull public Optional<ChannelUserMode> getTargetedChannelInfo(@Nonnull String name)
ServerInfo.WithManagementgetTargetedChannelInfo in interface ServerInfo.WithManagementname - channel name with mode tag@Nonnull public List<UserMode> getUserModes()
ServerInfogetUserModes in interface ServerInfopublic void setUserModes(@Nonnull List<UserMode> userModes)
ServerInfo.WithManagementsetUserModes in interface ServerInfo.WithManagementuserModes - user modesCopyright © 2013–2019 Kitteh. All rights reserved.