]> git.eshelyaron.com Git - emacs.git/commit
Don't send multiline commands as messages in ERC
authorF. Jason Park <jp@neverwas.me>
Tue, 18 Apr 2023 06:09:49 +0000 (23:09 -0700)
committerF. Jason Park <jp@neverwas.me>
Sat, 6 May 2023 00:18:01 +0000 (17:18 -0700)
commit16306567706c9621cef169d0e992b9b3b08a9d7e
treec86256e93d2da9cfe9328fa16d35130831ac3345
parentb0d761be0f9b0180566d7cde1ef2eea33402dd4e
Don't send multiline commands as messages in ERC

* lisp/erc/erc.el (erc-command-regexp): Relocate from further down in
same file.
(erc--check-prompt-input-for-multiline-command): Reject slash commands
containing multiple lines during input validation and before running
additional hooks.
(erc--discard-trailing-multiline-nulls): Don't mark input that begins
with a possible "slash command" as constituting a plain message just
because it has a trailing newline.  It's relatively easy to add a
newline by accident, which can result in the unintended sharing of a
command line.  Also, ERC already has a /SAY command that allows a user
to send a message starting a literal command.
* test/lisp/erc/erc-tests.el (erc-send-whitespace-lines): Fix test to
expect validation error when non-blank lines follow a slash command.
(Bug#62947)
lisp/erc/erc.el
test/lisp/erc/erc-tests.el