Commit 55dcd32a authored by Leo Liu's avatar Leo Liu

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.
parent bd0f1731
......@@ -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)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment