add pm banlist:auth and pm banlist:auto

This commit is contained in:
Aine
2023-09-25 21:59:23 +03:00
parent b413e5871a
commit 18f1113d33
7 changed files with 136 additions and 7 deletions

View File

@@ -21,6 +21,8 @@ const (
BotQueueBatch = "queue:batch"
BotQueueRetries = "queue:retries"
BotBanlistEnabled = "banlist:enabled"
BotBanlistAuto = "banlist:auto"
BotBanlistAuth = "banlist:auth"
BotGreylist = "greylist"
BotMautrix015Migration = "mautrix015migration"
)
@@ -72,6 +74,16 @@ func (s Bot) BanlistEnabled() bool {
return utils.Bool(s.Get(BotBanlistEnabled))
}
// BanlistAuto option
func (s Bot) BanlistAuto() bool {
return utils.Bool(s.Get(BotBanlistAuto))
}
// BanlistAuth option
func (s Bot) BanlistAuth() bool {
return utils.Bool(s.Get(BotBanlistAuth))
}
// Greylist option (duration in minutes)
func (s Bot) Greylist() int {
return utils.Int(s.Get(BotGreylist))