emacs-erc
[Top][All Lists]
Advanced

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

Re: /ame source


From: Emanuel Berg
Subject: Re: /ame source
Date: Fri, 05 Jan 2024 02:52:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

J.P. wrote:

> I wonder if we should instead change the behavior to match
> the doc string because I thought only commands that start
> with G ("global") are meant to affect all servers. IOW, why
> not copy the existing functionality to a /GMSG and make
> /AMSG only affect channels on the current server?

If we want AME and GME, here they are.

Not sure if that warning part of the docstring can be used
repeatedly without copying/hardcoding it each time - if so,
that would be better.

(defun erc-cmd-GME (line)
  "Send LINE as an action to all channels on all networks.
\nWarning: Use of this function is considered spamming;
         it is included for testing purposes only."
  (interactive "sSend action to all channels on all networks: ")
  (erc-with-all-buffers-of-server nil
    (lambda () (erc-channel-p (erc-default-target)))
    (erc-cmd-ME line) ))
(put 'erc-cmd-GME 'do-not-parse-args t)

(defun erc-cmd-AME (line)
  "Send LINE as an action to all channels on the current network.
\nWarning: Use of this function is considered spamming;
         it is included for testing purposes only."
  (interactive "sSend action to all channels on this network: ")
  (erc-with-all-buffers-of-server erc-server-process
    (lambda () (erc-channel-p (erc-default-target)))
    (erc-cmd-ME line) ))
(put 'erc-cmd-AME 'do-not-parse-args t)

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




reply via email to

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