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 (from parent 1:
28df2e2
)
Working on message evaluation.
author
Tim Vaughan
<plugd@thelambdalab.xyz>
Wed, 16 Jun 2021 22:15:04 +0000
(
00:15
+0200)
committer
Tim Vaughan
<plugd@thelambdalab.xyz>
Wed, 16 Jun 2021 22:15:04 +0000
(
00:15
+0200)
lirc.el
patch
|
blob
|
history
diff --git
a/lirc.el
b/lirc.el
index
3d7a975
..
131b7cc
100644
(file)
--- a/
lirc.el
+++ b/
lirc.el
@@
-43,7
+43,7
@@
"Default full name.")
(defcustom lirc-user-name "plugd"
"Default user name.")
"Default full name.")
(defcustom lirc-user-name "plugd"
"Default user name.")
-(defcustom lirc-host "
irc.libera.cha
t"
+(defcustom lirc-host "
localhos
t"
"Default server.")
(defcustom lirc-port 6667
"Default port.")
"Default server.")
(defcustom lirc-port 6667
"Default port.")
@@
-185,11
+185,10
@@
(with-current-buffer "*lirc*"
(set-marker-insertion-type lirc-prompt-marker nil)
(set-marker-insertion-type lirc-input-marker t)
(with-current-buffer "*lirc*"
(set-marker-insertion-type lirc-prompt-marker nil)
(set-marker-insertion-type lirc-input-marker t)
- (let ((inhibit-read-only t))
- (delete-region lirc-prompt-marker lirc-input-marker))
(save-excursion
(save-excursion
- (goto-char lirc-prompt-marker)
(let ((inhibit-read-only t))
(let ((inhibit-read-only t))
+ (delete-region lirc-prompt-marker lirc-input-marker)
+ (goto-char lirc-prompt-marker)
(insert
(propertize (if lirc-current-channel
lirc-current-channel
(insert
(propertize (if lirc-current-channel
lirc-current-channel
@@
-199,8
+198,8
@@
(propertize lirc-prompt-string
'face 'lirc-prompt
'read-only t
(propertize lirc-prompt-string
'face 'lirc-prompt
'read-only t
- 'rear-nonsticky t))))
-
(set-marker-insertion-type lirc-input-marker nil)
))
+ 'rear-nonsticky t))))
)
+
(set-marker-insertion-type lirc-input-marker nil
))
(defvar lirc-prompt-marker nil
"Marker for prompt position in LIRC buffer.")
(defvar lirc-prompt-marker nil
"Marker for prompt position in LIRC buffer.")
@@
-225,13
+224,18
@@
(defun lirc-eval-msg-string (string)
(let* ((msg (lirc-string->msg string)))
(defun lirc-eval-msg-string (string)
(let* ((msg (lirc-string->msg string)))
- (
cond
- (
(equal (lirc-msg-cmd msg) "PING")
+ (
pcase (lirc-msg-cmd msg)
+ (
"PING"
(lirc-send-msg
(lirc-msg nil nil "PONG" (lirc-msg-params msg))))
(lirc-send-msg
(lirc-msg nil nil "PONG" (lirc-msg-params msg))))
- ((string-match (rx (= 3 digit)) (lirc-msg-cmd msg))
- (lirc-display-string (string-join (cdr (lirc-msg-params msg)) " ")))
- (t
+ ;; ((rx (= 3 digit))
+ ;; (lirc-display-string (string-join (cdr (lirc-msg-params msg)) " ")))
+ ((and "JOIN" (let (rx (: (literal lirc-nick) "!" (* anychar))) (lirc-msg-src msg)))
+ (let ((channel (car (lirc-msg-params msg))))
+ (setq lirc-current-channel channel)
+ (add-to-list 'lirc-channel-list channel)
+ (lirc-render-prompt)))
+ (_
(lirc-display-string (lirc-msg->string msg))))))
(lirc-display-string (lirc-msg->string msg))))))