From: Tim Vaughan Date: Sat, 19 Jun 2021 16:15:16 +0000 (+0200) Subject: Command entering now separates cmd from params. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=lurk.git;a=commitdiff_plain;h=09d663a558f98effd144bfe74a8b44b52cbe0865 Command entering now separates cmd from params. --- diff --git a/lirc.el b/lirc.el index 77a2d60..5301072 100644 --- a/lirc.el +++ b/lirc.el @@ -185,8 +185,8 @@ portion of the source component of the message, as LIRC doesn't use this.") (setcdr (assoc channel-name lirc-channel-list) users)) (defun lirc-add-channel-users (channel-name &rest users) - (let ((current-users (lirc-channel-get-users channel-name))) - (lirc-channel-set-users channel-name (append users current-users)))) + (let ((current-users (lirc-get-channel-users channel-name))) + (lirc-set-channel-users channel-name (append users current-users)))) (defun lirc-del-channel-users (channel-name &rest users) (let ((current-users (lirc-get-channel-users channel-name))) @@ -311,9 +311,16 @@ portion of the source component of the message, as LIRC doesn't use this.") (defun lirc-enter-string (string) (if (string-prefix-p "/" string) (pcase (substring string 1) - (cmd-str - (lirc-send-msg (lirc-msg nil nil cmd-str)))) - (error "Not implemented."))) + ((rx (: (let cmd-str (+ (not space)))) + (opt + (: (+ " ") + (let params-str (+ anything))))) + (lirc-send-msg (lirc-msg nil nil + cmd-str + (if params-str + (split-string params-str) + nil))))) + (lirc-send-msg (lirc-msg nil nil "PRIVMSG" lirc-current-channel string)))) (defun lirc-enter () "Enter current contents of line after prompt."