Skip to content

Commit

Permalink
Merge pull request #8 from sopel-irc/silence-action
Browse files Browse the repository at this point in the history
util: don't respond if user not found in CTCP ACTION slap
  • Loading branch information
dgw authored Oct 21, 2024
2 parents 841f1ad + d447600 commit bd08ee1
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 bd08ee1

Please sign in to comment.