add !pm banlist:totals, fix notices on reactions
This commit is contained in:
@@ -31,6 +31,7 @@ const (
|
||||
commandSpamlistReset = "spam:reset"
|
||||
commandDelete = "delete"
|
||||
commandBanlist = "banlist"
|
||||
commandBanlistTotals = "banlist:totals"
|
||||
commandBanlistAuto = "banlist:auto"
|
||||
commandBanlistAuth = "banlist:auth"
|
||||
commandBanlistAdd = "banlist:add"
|
||||
@@ -315,6 +316,11 @@ func (b *Bot) initCommands() commandList {
|
||||
description: "Enable/disable automatic banning of IP addresses when they try to send invalid emails",
|
||||
allowed: b.allowAdmin,
|
||||
},
|
||||
{
|
||||
key: commandBanlistTotals,
|
||||
description: "List banlist totals only",
|
||||
allowed: b.allowAdmin,
|
||||
},
|
||||
{
|
||||
key: commandBanlistAdd,
|
||||
description: "Ban an IP",
|
||||
@@ -404,6 +410,8 @@ func (b *Bot) handle(ctx context.Context) {
|
||||
b.runBanlistAuth(ctx, commandSlice)
|
||||
case commandBanlistAuto:
|
||||
b.runBanlistAuto(ctx, commandSlice)
|
||||
case commandBanlistTotals:
|
||||
b.runBanlistTotals(ctx)
|
||||
case commandBanlistAdd:
|
||||
b.runBanlistAdd(ctx, commandSlice)
|
||||
case commandBanlistRemove:
|
||||
|
||||
Reference in New Issue
Block a user