'(("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)
(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))))
(lurk-enter-string line))))
-
;;; Mode
;;