Skip to content

Commit

Permalink
util: don't respond if user not found in CTCP ACTION slap
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Oct 18, 2024
1 parent 841f1ad commit d447600
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sopel_slap/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,12 @@ def slap(bot: SopelWrapper, trigger: Trigger, target: str):
return

if target not in bot.channels[trigger.sender].users:
bot.reply("You can't slap someone who isn't here!")
if not trigger.ctcp:
# only reply if a command was used; ignore CTCP ACTIONs
# we don't want the bot to be annoying to people who do "/me slaps"
# without realizing (or remembering) that the bot responds to it
bot.reply("You can't slap someone who isn't here!")

return

if target == bot.nick:
Expand Down

0 comments on commit d447600

Please sign in to comment.