Documentation ¶
Index ¶
- Variables
- func SplitChannelMembershipPrefixes(target string) (prefixes string, name string)
- type Mode
- type ModeChange
- type ModeChanges
- type ModeOp
- type ModeSet
- func (set *ModeSet) AllModes() (result []Mode)
- func (set *ModeSet) Copy(other *ModeSet)
- func (set *ModeSet) HasMode(mode Mode) bool
- func (set *ModeSet) Prefixes(isMultiPrefix bool) (prefixes string)
- func (set *ModeSet) SetMode(mode Mode, on bool) (applied bool)
- func (set *ModeSet) String() (result string)
- type Modes
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SupportedUserModes are the user modes that we actually support (modifying). SupportedUserModes = Modes{ Away, Bot, Invisible, Operator, RegisteredOnly, ServerNotice, UserRoleplaying, } // SupportedChannelModes are the channel modes that we support. SupportedChannelModes = Modes{ BanMask, ChanRoleplaying, ExceptMask, InviteMask, InviteOnly, Key, Moderated, NoOutside, OpOnlyTopic, RegisteredOnly, Secret, UserLimit, } )
View Source
var ( ChannelFounder Mode = 'q' // arg ChannelAdmin Mode = 'a' // arg ChannelOperator Mode = 'o' // arg Halfop Mode = 'h' // arg Voice Mode = 'v' // arg // ChannelPrivModes holds the list of modes that are privileged, ie founder/op/halfop, in order. // voice is not in this list because it cannot perform channel operator actions. ChannelPrivModes = Modes{ ChannelFounder, ChannelAdmin, ChannelOperator, Halfop, } // ChannelUserModes holds the list of all modes that can be applied to a user in a channel, // including Voice, in descending order of precedence ChannelUserModes = Modes{ ChannelFounder, ChannelAdmin, ChannelOperator, Halfop, Voice, } ChannelModePrefixes = map[Mode]string{ ChannelFounder: "~", ChannelAdmin: "&", ChannelOperator: "@", Halfop: "%", Voice: "+", } )
Functions ¶
func SplitChannelMembershipPrefixes ¶
SplitChannelMembershipPrefixes takes a target and returns the prefixes on it, then the name.
Types ¶
type Mode ¶
type Mode rune
Mode represents a user/channel/server mode
const ( Away Mode = 'a' Bot Mode = 'B' Invisible Mode = 'i' LocalOperator Mode = 'O' Operator Mode = 'o' Restricted Mode = 'r' RegisteredOnly Mode = 'R' ServerNotice Mode = 's' TLS Mode = 'Z' UserRoleplaying Mode = 'E' WallOps Mode = 'w' )
User Modes
const ( BanMask Mode = 'b' // arg ChanRoleplaying Mode = 'E' // flag ExceptMask Mode = 'e' // arg InviteMask Mode = 'I' // arg InviteOnly Mode = 'i' // flag Key Mode = 'k' // flag arg Moderated Mode = 'm' // flag NoOutside Mode = 'n' // flag OpOnlyTopic Mode = 't' // flag // RegisteredOnly mode is reused here from umode definition Secret Mode = 's' // flag UserLimit Mode = 'l' // flag arg )
Channel Modes
func GetLowestChannelModePrefix ¶
GetLowestChannelModePrefix returns the lowest channel prefix mode out of the given prefixes.
type ModeChange ¶
ModeChange is a single mode changing
func (*ModeChange) String ¶
func (change *ModeChange) String() (str string)
type ModeChanges ¶
type ModeChanges []ModeChange
ModeChanges are a collection of 'ModeChange's
func ParseChannelModeChanges ¶ added in v0.12.0
func ParseChannelModeChanges(params ...string) (ModeChanges, map[rune]bool)
ParseChannelModeChanges returns the valid changes, and the list of unknown chars.
func ParseUserModeChanges ¶
func ParseUserModeChanges(params ...string) (ModeChanges, map[rune]bool)
ParseUserModeChanges returns the valid changes, and the list of unknown chars.
func (ModeChanges) String ¶
func (changes ModeChanges) String() string
type ModeSet ¶
type ModeSet [1]uint64
ModeSet holds a set of modes.
Click to show internal directories.
Click to hide internal directories.