spamlist wildcards

This commit is contained in:
Aine
2022-10-16 20:14:54 +03:00
parent 1bc4d1188c
commit 42cb5221a1
7 changed files with 73 additions and 63 deletions

View File

@@ -157,28 +157,10 @@ func (b *Bot) initCommands() commandList {
allowed: b.allowOwner,
},
{
key: roomOptionSpamlistEmails,
key: roomOptionSpamlist,
description: fmt.Sprintf(
"Get or set `%s` of the room (comma-separated list), eg: `spammer@example.com,sspam@example.org`",
roomOptionSpamlistEmails,
),
sanitizer: utils.SanitizeStringSlice,
allowed: b.allowOwner,
},
{
key: roomOptionSpamlistHosts,
description: fmt.Sprintf(
"Get or set `%s` of the room (comma-separated list), eg: `spammer.com,scammer.com,morespam.com`",
roomOptionSpamlistHosts,
),
sanitizer: utils.SanitizeStringSlice,
allowed: b.allowOwner,
},
{
key: roomOptionSpamlistLocalparts,
description: fmt.Sprintf(
"Get or set `%s` of the room (comma-separated list), eg: `notspam,noreply,no-reply`",
roomOptionSpamlistLocalparts,
"Get or set `%s` of the room (comma-separated list), eg: `spammer@example.com,*@spammer.org,spam@*`",
roomOptionSpamlist,
),
sanitizer: utils.SanitizeStringSlice,
allowed: b.allowOwner,