Honor allowed users list

This commit is contained in:
Slavi Pantaleev
2022-08-27 17:29:00 +03:00
parent 275ccbd9e5
commit 3bc10bfe4f
2 changed files with 8 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ func (b *Bot) runStop(ctx context.Context, checkAllowed bool) {
return
}
if checkAllowed && !cfg.Allowed(b.noowner, evt.Sender) {
if checkAllowed && !cfg.Allowed(b.noowner, evt.Sender, b.allowedUsers) {
b.Notice(ctx, evt.RoomID, "you don't have permission to do that")
return
}
@@ -251,7 +251,7 @@ func (b *Bot) setOption(ctx context.Context, name, value string) {
return
}
if !cfg.Allowed(b.noowner, evt.Sender) {
if !cfg.Allowed(b.noowner, evt.Sender, b.allowedUsers) {
b.Notice(ctx, evt.RoomID, "you don't have permission to do that, kupo")
return
}