emacs-erc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ERC ban on regexps (e.g., to mute bot commands)


From: Emanuel Berg
Subject: ERC ban on regexps (e.g., to mute bot commands)
Date: Thu, 07 Oct 2021 13:15:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

I have a written an IRC bot in Python [1] and it now has
a plonk command which educates how to not be disturbed by it:

  <incal> ,, help plonk
  
    <sth> ,sth plonk   print how to not annoy or be annoyed
          with the bot
    
  <incal> ,, plonk
  
    <sth> Use #ghost to test and play with the bot.
          In catgirl, put 'ignore = sth' and 'ignore = *
          PRIVMSG * ,, *' in $XDG_CONFIG_HOME/catgirl or
          ~/.config/catgirl to block the bot including other
          people's use of it. In ERC, do (setq-default
          erc-ignore-list `(,@erc-
          
    <sth> ignore-list "sth"))

so yes, in ERC there is for this purpose

  ;; (setq-default erc-ignore-list nil)
  (setq-default erc-ignore-list `(,@erc-ignore-list "sth"))

and there is also, for a related purpose that doesn't apply
100% in this case, but still

  ;; (setq erc-ignore-reply-list nil)
  (setq erc-ignore-reply-list `(,@erc-ignore-reply-list "sth"))

however there seems to be no way of doing the catgirl

  ignore = * PRIVMSG * ,, *

blocking not people per se but people issuing bot commands?

PS. This feature would have many other use cases as well.

PPS. Note in the 'plonk' command output that with Lisp, you
     don't need to quote it when citing - it is
     self-enclosed :)

[1] https://dataswamp.org/~incal/#bot

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]