From 5f71c07dee05864c5e7f3a1bc80a5890c68609b5 Mon Sep 17 00:00:00 2001 From: "kayos@tcp.direct" Date: Sun, 23 Oct 2022 01:56:07 -0700 Subject: [PATCH] fmt --- modes.go | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/modes.go b/modes.go index 550035e..a592a2f 100644 --- a/modes.go +++ b/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?: -// 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. -// C = Mode that changes a setting and only has a parameter when set. -// D = Mode that changes a setting and never has a parameter. -// Note: Modes of type A return the list when there is no parameter present. -// 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. +// +// 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. +// C = Mode that changes a setting and only has a parameter when set. +// D = Mode that changes a setting and never has a parameter. +// Note: Modes of type A return the list when there is no parameter present. +// 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) { if len(c.raw) < 1 { return false, true @@ -458,7 +459,7 @@ type Perms struct { // IsAdmin indicates that the user has banning abilities, and are likely a // very trustable user (e.g. op+). -func (m Perms) IsAdmin() bool { +func (m *Perms) IsAdmin() bool { if m.Owner || m.Admin || m.Op { return true } @@ -468,7 +469,7 @@ func (m Perms) IsAdmin() bool { // IsTrusted indicates that the user at least has modes set upon them, higher // than a regular joining user. -func (m Perms) IsTrusted() bool { +func (m *Perms) IsTrusted() bool { if m.IsAdmin() || m.HalfOp || m.Voice { return true }