2017-09-29 09:33:29 +02:00
|
|
|
// Copyright (c) 2017 Daniel Oaks <daniel@danieloaks.net>
|
|
|
|
// released under the MIT license
|
|
|
|
|
2017-05-08 01:15:16 +02:00
|
|
|
// Package sno holds Server Notice masks for easy reference.
|
|
|
|
package sno
|
|
|
|
|
|
|
|
// Mask is a type of server notice mask.
|
|
|
|
type Mask rune
|
|
|
|
|
2021-02-08 17:43:13 +01:00
|
|
|
type Masks []Mask
|
|
|
|
|
2017-05-08 01:15:16 +02:00
|
|
|
// Notice mask types
|
|
|
|
const (
|
2020-02-02 08:03:08 +01:00
|
|
|
LocalAnnouncements Mask = 'a'
|
2017-05-08 01:15:16 +02:00
|
|
|
LocalConnects Mask = 'c'
|
|
|
|
LocalChannels Mask = 'j'
|
|
|
|
LocalKills Mask = 'k'
|
|
|
|
LocalNicks Mask = 'n'
|
|
|
|
LocalOpers Mask = 'o'
|
|
|
|
LocalQuits Mask = 'q'
|
|
|
|
Stats Mask = 't'
|
|
|
|
LocalAccounts Mask = 'u'
|
2020-02-02 08:03:08 +01:00
|
|
|
LocalVhosts Mask = 'v'
|
2021-02-08 17:43:13 +01:00
|
|
|
LocalXline Mask = 'x'
|
2017-05-08 01:15:16 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// NoticeMaskNames has readable names for our snomask types.
|
|
|
|
NoticeMaskNames = map[Mask]string{
|
2020-02-02 08:03:08 +01:00
|
|
|
LocalAnnouncements: "ANNOUNCEMENT",
|
2017-05-08 01:15:16 +02:00
|
|
|
LocalConnects: "CONNECT",
|
|
|
|
LocalChannels: "CHANNEL",
|
|
|
|
LocalKills: "KILL",
|
|
|
|
LocalNicks: "NICK",
|
|
|
|
LocalOpers: "OPER",
|
|
|
|
LocalQuits: "QUIT",
|
|
|
|
Stats: "STATS",
|
|
|
|
LocalAccounts: "ACCOUNT",
|
|
|
|
LocalXline: "XLINE",
|
2020-02-02 08:03:08 +01:00
|
|
|
LocalVhosts: "VHOST",
|
2017-05-08 01:15:16 +02:00
|
|
|
}
|
2018-04-16 05:20:37 +02:00
|
|
|
|
|
|
|
// ValidMasks contains the snomasks that we support.
|
2021-02-08 17:43:13 +01:00
|
|
|
ValidMasks = []Mask{
|
|
|
|
LocalAnnouncements,
|
|
|
|
LocalConnects,
|
|
|
|
LocalChannels,
|
|
|
|
LocalKills,
|
|
|
|
LocalNicks,
|
|
|
|
LocalOpers,
|
|
|
|
LocalQuits,
|
|
|
|
Stats,
|
|
|
|
LocalAccounts,
|
|
|
|
LocalVhosts,
|
|
|
|
LocalXline,
|
2018-04-16 05:20:37 +02:00
|
|
|
}
|
2017-05-08 01:15:16 +02:00
|
|
|
)
|