Documentation
¶
Overview ¶
Package flags contains all the bitmask based flags used in the database.
Package flags contains all the bitmask based flags used in the database.
Package flags contains all the bitmask based flags used in the database.
Package flags contains all the bitmask based flags used in the database.
Index ¶
- type ACL
- type Channel
- type ChannelUser
- func (f *ChannelUser) AddFlag(flag ChannelUser)
- func (f *ChannelUser) HasFlag(flag ChannelUser) bool
- func (f *ChannelUser) ListFlagNames() []string
- func (f *ChannelUser) ListFlags() []ChannelUser
- func (f ChannelUser) Name() string
- func (f *ChannelUser) RemoveFlag(flag ChannelUser)
- func (f *ChannelUser) ToggleFlag(flag ChannelUser)
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ACL ¶
type ACL int32
ACL is a bitmask based flag for ACLs.
const ( ACLXchgmgrReview ACL = 1 << iota ACLXchgmgrAdmin ACLXmailchReview ACLXmailchAdmin ACLXhelp ACLXhelpCanAdd ACLXhelpCanEdit ACLXwebaxs2 ACLXwebaxs3 ACLXwebctl ACLXwebacl ACLXwebusrToaster ACLXatCanView ACLXatCanEdit ACLXdomainLock ACLXsuspendUsr ACLXunsuspendUsr ACLXwebsess ACLXcomplaintsAdmRead ACLXcomplaintsAdmReply ACLXloggingView ACLXiprViewOwn ACLXiprViewOthers ACLXiprModOwn ACLXiprModOthers ACLXwebusrToasterRdonly ACLMiaView ACLXtotpDisableOthers )
ACL flags.
func (*ACL) ListFlagNames ¶ added in v0.3.1
ListFlagNames returns a slice of human-readable flag names for all flags that are currently set.
func (*ACL) ListFlags ¶ added in v0.3.1
ListFlags returns a slice of all flags that are currently set.
type Channel ¶ added in v0.3.1
type Channel int32
Channel is a bitmask based flag for channels.
const ( // ChannelNoPurge indicates that the channel should not be purged for inactivity ChannelNoPurge Channel = 0x00000001 // ChannelSpecial indicates that the channel is special (higher privileges) ChannelSpecial Channel = 0x00000002 // ChannelNoRegister indicates that the channel cannot be registered ChannelNoRegister Channel = 0x00000004 // ChannelNeverReg indicates that the channel can never be registered (permanent) ChannelNeverReg Channel = 0x00000008 // ChannelSuspended indicates that the channel is suspended ChannelSuspended Channel = 0x00000010 // ChannelTempSuspended indicates that the channel is temporarily suspended ChannelTempSuspended Channel = 0x00000020 // ChannelCaution indicates that the channel requires caution (admin attention) ChannelCaution Channel = 0x00000040 // ChannelVacation indicates that the channel is in vacation mode ChannelVacation Channel = 0x00000080 // ChannelLocked indicates that the channel is locked (no changes allowed) ChannelLocked Channel = 0x00000100 // ChannelFloatLimit indicates that the channel has floating limits ChannelFloatLimit Channel = 0x00000200 // ChannelMIA indicates that the channel is marked as MIA (Missing In Action) ChannelMIA Channel = 0x00000400 // ChannelJoinLimit indicates that the channel has join limits ChannelJoinLimit Channel = 0x00000800 // ChannelAlwaysOp indicates that users should always get op ChannelAlwaysOp Channel = 0x00010000 // ChannelStrictOp indicates that only certain users can get ops ChannelStrictOp Channel = 0x00020000 // ChannelNoOp indicates that no auto-op is allowed ChannelNoOp Channel = 0x00040000 // ChannelAutoTopic indicates that automatic topic management is enabled ChannelAutoTopic Channel = 0x00080000 // ChannelOpOnly indicates that only ops can perform certain actions (Deprecated) ChannelOpOnly Channel = 0x00100000 // ChannelAutoJoin indicates that the bot should auto-join the channel ChannelAutoJoin Channel = 0x00200000 // ChannelNoForce indicates that forced access is not allowed (Reserved for Planetarion) ChannelNoForce Channel = 0x00400000 // ChannelNoVoice indicates that no auto-voice is allowed ChannelNoVoice Channel = 0x00800000 // ChannelNoTake indicates that the channel cannot be taken over ChannelNoTake Channel = 0x01000000 // ChannelFloodPro indicates that flood protection is enabled ChannelFloodPro Channel = 0x02000000 // ChannelFloodProGLine indicates that flood protection with G-Line is enabled ChannelFloodProGLine Channel = 0x04000000 // ChannelOpLog indicates that operator actions should be logged ChannelOpLog Channel = 0x08000000 )
Channel flags - based on gnuworld sqlChannel constants.
func (*Channel) ListFlagNames ¶ added in v0.3.1
ListFlagNames returns a slice of human-readable flag names for all flags that are currently set.
func (*Channel) ListFlags ¶ added in v0.3.1
ListFlags returns a slice of all flags that are currently set.
func (*Channel) RemoveFlag ¶ added in v0.3.1
RemoveFlag removes the flag.
func (*Channel) ToggleFlag ¶ added in v0.3.1
ToggleFlag toggles the flag.
type ChannelUser ¶ added in v0.3.1
type ChannelUser int16
ChannelUser is a bitmask based flag for channel userflags.
const ( // ChannelUserNone indicates no special user flags - default value ChannelUserNone ChannelUser = 0x0 // ChannelUserOp indicates that default mode should be OP ChannelUserOp ChannelUser = 0x1 // ChannelUserVoice indicates that default mode should be VOICE ChannelUserVoice ChannelUser = 0x2 )
Channel userflags (default user permissions) - based on gnuworld constants.
func (*ChannelUser) AddFlag ¶ added in v0.3.1
func (f *ChannelUser) AddFlag(flag ChannelUser)
AddFlag adds the flag.
func (*ChannelUser) HasFlag ¶ added in v0.3.1
func (f *ChannelUser) HasFlag(flag ChannelUser) bool
HasFlag returns true if the flag is set.
func (*ChannelUser) ListFlagNames ¶ added in v0.3.1
func (f *ChannelUser) ListFlagNames() []string
ListFlagNames returns a slice of human-readable flag names for all flags that are currently set.
func (*ChannelUser) ListFlags ¶ added in v0.3.1
func (f *ChannelUser) ListFlags() []ChannelUser
ListFlags returns a slice of all flags that are currently set.
func (ChannelUser) Name ¶ added in v0.3.1
func (f ChannelUser) Name() string
Name returns the human-readable name of the flag.
func (*ChannelUser) RemoveFlag ¶ added in v0.3.1
func (f *ChannelUser) RemoveFlag(flag ChannelUser)
RemoveFlag removes the flag.
func (*ChannelUser) ToggleFlag ¶ added in v0.3.1
func (f *ChannelUser) ToggleFlag(flag ChannelUser)
ToggleFlag toggles the flag.
type User ¶
type User int16
User is a bitmask based flag for users.
const ( // UserGlobalSuspend indicates that the user is globally suspended UserGlobalSuspend User = 1 << iota // UserLoggedIn is deprecated UserLoggedIn // UserInvisible indicates that the user is invisible UserInvisible // UserFraud indicates that the username is fraud UserFraud // UserNoNotes indicates that the user do not want to be sent notes UserNoNotes // UserNoPurge do not remove the user for being idle UserNoPurge // UserNoAdmin indicates that any * authentication is disabled (verify/commands) UserNoAdmin // UserAlumni indicates that any * privileged is gone, *except* tg he verify; it is like an honorary position UserAlumni // UserOper indicates that the user is flagged as being an official operator, as for allowing them // special accesses such as posting complaints even when system is closed to public. UserOper // UserNoAdduser prevent anyone adding the username to channels (user-set flag, default disabled) UserNoAdduser // UserTotpEnabled indicates that TOTP is enabled for the user UserTotpEnabled // UserTotpAdminIpr indicates that the admin user has IP restrictions UserTotpAdminIpr )
User flags.
func (*User) ListFlagNames ¶ added in v0.3.1
ListFlagNames returns a slice of human-readable flag names for all flags that are currently set.
func (*User) ListFlags ¶ added in v0.3.1
ListFlags returns a slice of all flags that are currently set.