Skip to content

Commit

Permalink
Merge pull request #6 from sopel-irc/protect-owners-too
Browse files Browse the repository at this point in the history
Protect owners too, not only normal admins
  • Loading branch information
dgw authored Sep 9, 2024
2 parents cf0e55f + 9a8f646 commit c7d3f02
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sopel_slap/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ def slap(bot: SopelWrapper, trigger: Trigger, target: str):
else:
target = 'itself'

if target in bot.config.core.admins and not trigger.admin:
if not trigger.admin and (
target == bot.config.core.owner or
target in bot.config.core.admins
):
target = trigger.nick

verb = random.choice(bot.settings.slap.verbs)
Expand Down

0 comments on commit c7d3f02

Please sign in to comment.