mirror of
https://github.com/jeremyd/ergo.git
synced 2026-05-24 08:44:46 -07:00
add +u and +U to CHANMODES token
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
package modes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
@@ -450,3 +451,22 @@ func RplMyInfo() (param1, param2, param3 string) {
|
||||
|
||||
return userModes.String(), channelModes.String(), channelParametrizedModes.String()
|
||||
}
|
||||
|
||||
func ChanmodesToken() (result string) {
|
||||
// https://modern.ircdocs.horse#chanmodes-parameter
|
||||
// type A: listable modes with parameters
|
||||
A := Modes{BanMask, ExceptMask, InviteMask}
|
||||
// type B: modes with parameters
|
||||
B := Modes{Key}
|
||||
// type C: modes that take a parameter only when set, never when unset
|
||||
C := Modes{UserLimit}
|
||||
// type D: modes without parameters
|
||||
D := Modes{InviteOnly, Moderated, NoOutside, OpOnlyTopic, ChanRoleplaying, Secret, NoCTCP, RegisteredOnly, RegisteredOnlySpeak, Auditorium, OpModerated}
|
||||
|
||||
sort.Sort(ByCodepoint(A))
|
||||
sort.Sort(ByCodepoint(B))
|
||||
sort.Sort(ByCodepoint(C))
|
||||
sort.Sort(ByCodepoint(D))
|
||||
|
||||
return fmt.Sprintf("%s,%s,%s,%s", A.String(), B.String(), C.String(), D.String())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user