From 2695c9007cff7d9bfdf4dc1f3920ce4c497d6776 Mon Sep 17 00:00:00 2001 From: plugd Date: Thu, 22 Jul 2021 09:54:48 +0200 Subject: [PATCH] Added join as a client command. Allowed joining than one channel in one go. --- lurk.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lurk.el b/lurk.el index 6dbb8bf..ad4b1e2 100644 --- 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) + ("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) @@ -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.)")) +(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 -- 2.20.1