From: Leo Liu Date: Mon, 7 Oct 2019 10:52:33 +0000 (+0800) Subject: Fix rcirc not to interpret nil as nickname (bug#37344) X-Git-Tag: emacs-27.0.90~879^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55dcd32;p=emacs.git Fix rcirc not to interpret nil as nickname (bug#37344) * lisp/net/rcirc.el (rcirc-send-privmsg): Type check `target'. (rcirc-cmd-me): Send CTCP only when `target' exists. --- diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el index de524d9ef10..d95db26cae9 100644 --- a/lisp/net/rcirc.el +++ b/lisp/net/rcirc.el @@ -825,6 +825,7 @@ Function is called with PROCESS, COMMAND, SENDER, ARGS and LINE.") (process-send-string process string))) (defun rcirc-send-privmsg (process target string) + (cl-check-type target string) (rcirc-send-string process (format "PRIVMSG %s :%s" target string))) (defun rcirc-send-ctcp (process target request &optional args) @@ -2337,8 +2338,8 @@ With a prefix arg, prompt for new topic." (let ((timestamp (format-time-string "%s"))) (rcirc-send-ctcp process target "PING" timestamp))) -(defun rcirc-cmd-me (args &optional process target) - (rcirc-send-ctcp process target "ACTION" args)) +(defun rcirc-cmd-me (args process target) + (when target (rcirc-send-ctcp process target "ACTION" args))) (defun rcirc-add-or-remove (set &rest elements) (dolist (elt elements)