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:
d9a9192
)
Added command to list networks.
author
plugd
<plugd@thelambdalab.xyz>
Fri, 16 Jul 2021 09:41:27 +0000
(11:41 +0200)
committer
plugd
<plugd@thelambdalab.xyz>
Fri, 16 Jul 2021 09:41:27 +0000
(11:41 +0200)
lurk.el
patch
|
blob
|
history
diff --git
a/lurk.el
b/lurk.el
index
bd1e416
..
bae68ce
100644
(file)
--- a/
lurk.el
+++ b/
lurk.el
@@
-826,6
+826,7
@@
in which case they match anything.")
'(("DEBUG" "Toggle debug mode on/off." lurk-command-debug lurk-boolean-completions)
("HEADER" "Toggle display of header." lurk-command-header lurk-boolean-completions)
("CONNECT" "Connect to an IRC network." lurk-command-connect lurk-network-completions)
'(("DEBUG" "Toggle debug mode on/off." lurk-command-debug lurk-boolean-completions)
("HEADER" "Toggle display of header." lurk-command-header lurk-boolean-completions)
("CONNECT" "Connect to an IRC network." lurk-command-connect lurk-network-completions)
+ ("NETWORKS" "List known IRC networks." lurk-command-networks)
("TOPIC" "Set topic for current channel." lurk-command-topic)
("ME" "Display action." lurk-command-me)
("VERSION" "Request version of another user's client via CTCP." lurk-command-version)
("TOPIC" "Set topic for current channel." lurk-command-topic)
("ME" "Display action." lurk-command-me)
("VERSION" "Request version of another user's client via CTCP." lurk-command-version)
@@
-893,6
+894,15
@@
in which case they match anything.")
(lurk-connect network))
(lurk-display-notice nil "Usage: /connect <network>")))
(lurk-connect network))
(lurk-display-notice nil "Usage: /connect <network>")))
+(defun lurk-command-networks (params)
+ (lurk-display-notice nil "Currently-known networks:")
+ (dolist (row lurk-networks)
+ (seq-let (network server port &rest others) row
+ (lurk-display-notice nil "\t" network
+ " [" server
+ " " (number-to-string port) "]")))
+ (lurk-display-notice nil "(Modify the `lurk-networks' variable to add more.)"))
+
(defun lurk-command-quit (params)
(let ((quit-msg (if params (string-join params " ") nil)))
(lurk-send-msg (lurk-msg nil nil "QUIT" quit-msg))))
(defun lurk-command-quit (params)
(let ((quit-msg (if params (string-join params " ") nil)))
(lurk-send-msg (lurk-msg nil nil "QUIT" quit-msg))))
@@
-1075,7
+1085,6
@@
in which case they match anything.")
(lurk-enter-string line))))
(lurk-enter-string line))))
-
;;; Mode
;;
;;; Mode
;;