fmt
This commit is contained in:
parent
d91de1c3c0
commit
5f71c07dee
19
modes.go
19
modes.go
@ -119,13 +119,14 @@ func (c *CModes) Get(mode string) (args string, ok bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// hasArg checks to see if the mode supports arguments. What ones support this?:
|
// hasArg checks to see if the mode supports arguments. What ones support this?:
|
||||||
// A = Mode that adds or removes a nick or address to a list. Always has a parameter.
|
//
|
||||||
// B = Mode that changes a setting and always has a parameter.
|
// A = Mode that adds or removes a nick or address to a list. Always has a parameter.
|
||||||
// C = Mode that changes a setting and only has a parameter when set.
|
// B = Mode that changes a setting and always has a parameter.
|
||||||
// D = Mode that changes a setting and never has a parameter.
|
// C = Mode that changes a setting and only has a parameter when set.
|
||||||
// Note: Modes of type A return the list when there is no parameter present.
|
// D = Mode that changes a setting and never has a parameter.
|
||||||
// Note: Some clients assumes that any mode not listed is of type D.
|
// Note: Modes of type A return the list when there is no parameter present.
|
||||||
// Note: Modes in PREFIX are not listed but could be considered type B.
|
// Note: Some clients assumes that any mode not listed is of type D.
|
||||||
|
// Note: Modes in PREFIX are not listed but could be considered type B.
|
||||||
func (c *CModes) hasArg(set bool, mode byte) (hasArgs, isSetting bool) {
|
func (c *CModes) hasArg(set bool, mode byte) (hasArgs, isSetting bool) {
|
||||||
if len(c.raw) < 1 {
|
if len(c.raw) < 1 {
|
||||||
return false, true
|
return false, true
|
||||||
@ -458,7 +459,7 @@ type Perms struct {
|
|||||||
|
|
||||||
// IsAdmin indicates that the user has banning abilities, and are likely a
|
// IsAdmin indicates that the user has banning abilities, and are likely a
|
||||||
// very trustable user (e.g. op+).
|
// very trustable user (e.g. op+).
|
||||||
func (m Perms) IsAdmin() bool {
|
func (m *Perms) IsAdmin() bool {
|
||||||
if m.Owner || m.Admin || m.Op {
|
if m.Owner || m.Admin || m.Op {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -468,7 +469,7 @@ func (m Perms) IsAdmin() bool {
|
|||||||
|
|
||||||
// IsTrusted indicates that the user at least has modes set upon them, higher
|
// IsTrusted indicates that the user at least has modes set upon them, higher
|
||||||
// than a regular joining user.
|
// than a regular joining user.
|
||||||
func (m Perms) IsTrusted() bool {
|
func (m *Perms) IsTrusted() bool {
|
||||||
if m.IsAdmin() || m.HalfOp || m.Voice {
|
if m.IsAdmin() || m.HalfOp || m.Voice {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user