Documentation ¶
Overview ¶
Package isupport provides parsers for IRC ISUPPORT lines
Package isupport contains an implementation of an ISUPPORT message handler
Index ¶
- type ISupport
- func (i *ISupport) CaseMapping() string
- func (i *ISupport) ChanLimit() map[string]int
- func (i *ISupport) ChanModes() string
- func (i *ISupport) ChanTypes() []string
- func (i *ISupport) EList() []string
- func (i *ISupport) Excepts() string
- func (i *ISupport) Extban() (prefix string, types []string)
- func (i *ISupport) GetToken(name string) (value string, exists bool)
- func (i *ISupport) GetTokenDefault(name, dflt string) string
- func (i *ISupport) HasToken(name string) bool
- func (i *ISupport) InviteExemption() string
- func (i *ISupport) MaxAwayLen() int
- func (i *ISupport) MaxChanLen() int
- func (i *ISupport) MaxCommandTargets() map[string]int
- func (i *ISupport) MaxHostLen() int
- func (i *ISupport) MaxKickLen() int
- func (i *ISupport) MaxListModes() map[rune]int
- func (i *ISupport) MaxModes() int
- func (i *ISupport) MaxNickLen() int
- func (i *ISupport) MaxTargets() int
- func (i *ISupport) MaxTopicLen() int
- func (i *ISupport) Modes() mode.Set
- func (i *ISupport) Network() string
- func (i *ISupport) NumericToken(name string) int
- func (i *ISupport) Parse(msg *ircmsg.Message)
- func (i *ISupport) Prefix() map[rune]rune
- func (i *ISupport) SafeList() bool
- func (i *ISupport) SilenceMax() int
- func (i *ISupport) StatusMsg() []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ISupport ¶
type ISupport struct {
// contains filtered or unexported fields
}
ISupport represents ISUPPORT tokens from the server
func (*ISupport) CaseMapping ¶
CaseMapping returns the casemapping of the server, or "" if unset
func (*ISupport) ChanLimit ¶
ChanLimit returns the maximum number of channels a client may be in, per channel type https://modern.ircdocs.horse/#chanlimit-parameter
func (*ISupport) ChanModes ¶
ChanModes Returns the raw CHANMODES isupport param. You likely want Modes https://modern.ircdocs.horse/#chanmodes-parameter
func (*ISupport) ChanTypes ¶
ChanTypes returns the list of channel types supported by the network https://modern.ircdocs.horse/#chantypes-parameter
func (*ISupport) EList ¶
EList returns the supported extensions to the LIST command https://modern.ircdocs.horse/#elist-parameter
func (*ISupport) Excepts ¶
Excepts returns the mode to set ban exemptions, assuming the server supports it.
func (*ISupport) Extban ¶
Extban returns the prefix and available extban characters https://modern.ircdocs.horse/#rplisupport-parameters
func (*ISupport) GetToken ¶
GetToken gets a token by name if it exists. You will likely want to use named methods for the token you want instead, assuming they exist.
func (*ISupport) GetTokenDefault ¶
GetTokenDefault gets the given token, and returns a default if the *content* of the token is "". You should verify that the token at least existed before using this.
func (*ISupport) InviteExemption ¶
InviteExemption returns the invite exemption mode, if supported https://modern.ircdocs.horse/#invex-parameter
func (*ISupport) MaxAwayLen ¶
MaxAwayLen returns the maximum size of an away message, or -1 if unlimited or unset
func (*ISupport) MaxChanLen ¶
MaxChanLen returns the maximum length of a channel the client may join https://modern.ircdocs.horse/#channellen-parameter
func (*ISupport) MaxCommandTargets ¶
MaxCommandTargets returns a map of commandname (ToLower()'d) to int, where the int is the maximum number of targets allowed, -1 meaning no limit https://modern.ircdocs.horse/#targmax-parameter
func (*ISupport) MaxHostLen ¶
MaxHostLen returns the maximum hostname length the server SHOULD use Its possible this will be outright ignored https://modern.ircdocs.horse/#hostlen-parameter
func (*ISupport) MaxKickLen ¶
MaxKickLen returns the maximum length a kick message should have when sent by the client https://modern.ircdocs.horse/#kicklen-parameter
func (*ISupport) MaxListModes ¶
MaxListModes returns an array of mode char -> int, mapping the maximum https://modern.ircdocs.horse/#maxlist-parameter
func (*ISupport) MaxModes ¶
MaxModes returns the maximum number of type A, B, and C modes that should be sent in a single MODE command. -1 is returned when either the token wasn't present, or the number is unlimited https://modern.ircdocs.horse/#modes-parameter
func (*ISupport) MaxNickLen ¶
MaxNickLen returns the maximum nick length the client should send to the server https://modern.ircdocs.horse/#nicklen-parameter
func (*ISupport) MaxTargets ¶
MaxTargets returns the maximum targets for all commands. i.MaxCommandTargets should be preferred to this if available https://modern.ircdocs.horse/#maxtargets-parameter
func (*ISupport) MaxTopicLen ¶
MaxTopicLen returns the maximum topic size the client should send to the server https://modern.ircdocs.horse/#topiclen-parameter
func (*ISupport) Modes ¶
Modes returns the channel modes available on this ISupport struct. the returned data is a copy
func (*ISupport) Network ¶
Network returns the content of the NETWORK token, if it exists https://modern.ircdocs.horse/#network-parameter
func (*ISupport) NumericToken ¶
NumericToken returns the value of a token as a number, or -1 if it either doesn't exist, or fails to be parsed as a base 10 number
func (*ISupport) Parse ¶
Parse parses an RPL_ISUPPORT line into its constituent tokens, and adds them to the ISupport struct
func (*ISupport) Prefix ¶
Prefix returns a map of modeChar -> prefix https://modern.ircdocs.horse/#prefix-parameter
func (*ISupport) SafeList ¶
SafeList returns whether or not LIST usage promises to not RECVQ (disconnect due to large buffer of sent data server side) https://modern.ircdocs.horse/#safelist-parameter
func (*ISupport) SilenceMax ¶
SilenceMax returns the maximum number of entries on the SILENCE list. a return of -1 indicates silence is *NOT* supported https://modern.ircdocs.horse/#silence-parameter
func (*ISupport) StatusMsg ¶
StatusMsg returns the different prefixes for status messages, or nil https://modern.ircdocs.horse/#statusmsg-parameter