From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Emanuel Berg via General discussion about ERC Newsgroups: gmane.emacs.erc.general,gmane.emacs.help Subject: ERC ban on regexps (e.g., to mute bot commands) Date: Thu, 07 Oct 2021 13:15:05 +0200 Message-ID: <87y275m6h2.fsf@zoho.eu> Reply-To: Emanuel Berg Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28466"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: emacs-erc@gnu.org Cancel-Lock: sha1:W0diPHSnHsuKUjDElfj/kMt9J0I= Original-X-From: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Thu Oct 07 13:16:15 2021 Return-path: Envelope-to: sf-erc-help@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mYRNl-0007DS-KQ for sf-erc-help@m.gmane-mx.org; Thu, 07 Oct 2021 13:16:13 +0200 Original-Received: from localhost ([::1]:33450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mYRNk-0006wo-9C for sf-erc-help@m.gmane-mx.org; Thu, 07 Oct 2021 07:16:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60108) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYRMw-0006w0-EA for emacs-erc@gnu.org; Thu, 07 Oct 2021 07:15:23 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]:59138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mYRMt-000610-Ku for emacs-erc@gnu.org; Thu, 07 Oct 2021 07:15:22 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mYRMn-0005tD-Jc for emacs-erc@gnu.org; Thu, 07 Oct 2021 13:15:13 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-erc@gnu.org Original-Followup-To: gmane.emacs.erc.general Mail-Copies-To: never Received-SPF: pass client-ip=116.202.254.214; envelope-from=sf-erc-help@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 8 X-Spam_score: 0.8 X-Spam_bar: / X-Spam_report: (0.8 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TO_NO_BRKTS_PCNT=2.499 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-erc@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General discussion about ERC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-erc-bounces+sf-erc-help=m.gmane-mx.org@gnu.org Original-Sender: "emacs-erc" Xref: news.gmane.io gmane.emacs.erc.general:1633 gmane.emacs.help:133640 Archived-At: 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: ,, help plonk ,sth plonk print how to not annoy or be annoyed with the bot ,, plonk 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- 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