about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-06-05T15·00+0200
committergrfn <grfn@gws.fyi>2021-06-05T15·25+0000
commite38e826862beb732721b80e3fbfa02da1fab9138 (patch)
treeebc691f89b2e5290a6f2d73355c512a0ea24cc8d /users
parentbf9857beff50f534a04a080746f52fee8904be12 (diff)
feat(gs/emacs): Update irc-connect command for new servers r/2643
No longer connecting to freenode - but I *am* now connecting to both
hackint and libera, so add a prompt to the command to decide which one I
connect to

Change-Id: Iae315ddab753cf9c365cbee7abd94213af656d4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3177
Reviewed-by: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users')
-rw-r--r--users/grfn/emacs.d/irc.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/users/grfn/emacs.d/irc.el b/users/grfn/emacs.d/irc.el
index 8664b7a2896e..117869599d83 100644
--- a/users/grfn/emacs.d/irc.el
+++ b/users/grfn/emacs.d/irc.el
@@ -3,9 +3,15 @@
 (require 'erc)
 (require 'alert)
 
-(defun irc-connect ()
-  (interactive)
-  (let ((pw (s-trim (shell-command-to-string "pass irccloud/freenode")))
+(defvar irc-servers
+  '("hackint"
+    "libera"))
+
+(defun irc-connect (server)
+  (interactive
+   (list (ivy-read "Server: " irc-servers)))
+  (let ((pw (s-trim (shell-command-to-string
+                     (format "pass irccloud/%s" server))))
         (gnutls-verify-error nil))
     (erc-tls :server "bnc.irccloud.com"
              :port 6697