Added join as a client command.
authorplugd <plugd@thelambdalab.xyz>
Thu, 22 Jul 2021 07:54:48 +0000 (09:54 +0200)
committerplugd <plugd@thelambdalab.xyz>
Thu, 22 Jul 2021 07:54:48 +0000 (09:54 +0200)
Allowed joining than one channel in one go.

lurk.el

diff --git a/lurk.el b/lurk.el
index 6dbb8bf..ad4b1e2 100644 (file)
--- a/lurk.el
+++ b/lurk.el
@@ -850,6 +850,7 @@ in which case they match anything.")
     ("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)
     ("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)
+    ("JOIN" "Join one or more channels." lurk-command-join)
     ("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)
@@ -926,6 +927,12 @@ in which case they match anything.")
                            " " (number-to-string port) "]")))
   (lurk-display-notice nil "(Modify the `lurk-networks' variable to add more.)"))
 
                            " " (number-to-string port) "]")))
   (lurk-display-notice nil "(Modify the `lurk-networks' variable to add more.)"))
 
+(defun lurk-command-join (params)
+  (if params
+      (dolist (channel params)
+        (lurk-send-msg (lurk-msg nil nil "JOIN" channel)))
+    (lurk-display-notice nil "Usage: /join channel [channel2 ...]")))
+
 (defun lurk-command-part (params)
   (let ((channel (if params (car params) lurk-current-context)))
     (if channel
 (defun lurk-command-part (params)
   (let ((channel (if params (car params) lurk-current-context)))
     (if channel