The Lambda Lab
/
projects
/
lurk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6b835f7
)
Command entering now separates cmd from params.
author
Tim Vaughan
<plugd@thelambdalab.xyz>
Sat, 19 Jun 2021 16:15:16 +0000
(18:15 +0200)
committer
Tim Vaughan
<plugd@thelambdalab.xyz>
Sat, 19 Jun 2021 16:15:16 +0000
(18:15 +0200)
lirc.el
patch
|
blob
|
history
diff --git
a/lirc.el
b/lirc.el
index
77a2d60
..
5301072
100644
(file)
--- 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)
(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)))
(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)
(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."
(defun lirc-enter ()
"Enter current contents of line after prompt."