]> git.armaanb.net Git - config.org.git/commitdiff
Add networks to Circe
authorArmaan Bhojwani <me@armaanb.net>
Wed, 19 May 2021 19:19:07 +0000 (15:19 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Wed, 19 May 2021 19:23:07 +0000 (15:23 -0400)
config.org

index df96ffae8679f9ba181fcee019ea488a9897208c..964ab2cb44e49021909a75db4fa5c975bd27e4d6 100644 (file)
@@ -446,32 +446,52 @@ Some EWW enhancements.
 #+end_src
 ** IRC
 #+begin_src emacs-lisp
-  (defun fetch-password (&rest params)
-    (require 'auth-source)
-    (let ((match (car (apply 'auth-source-search params))))
-      (if match
-          (let ((secret (plist-get match :secret)))
-            (if (functionp secret)
-                (funcall secret)
-              secret))
-        (error "Password not found for %S" params))))
+      (defun fetch-password (&rest params)
+        (require 'auth-source)
+        (let ((match (car (apply 'auth-source-search params))))
+          (if match
+              (let ((secret (plist-get match :secret)))
+                (if (functionp secret)
+                    (funcall secret)
+                  secret))
+            (error "Password not found for %S" params))))
 
-  (use-package circe
-    :config
-    (enable-lui-track)
-    (enable-circe-color-nicks)
-    (circe "pounce")
-    :custom
-    (circe-network-options . '(("pounce"
-                                :host "irc.armaanb.net"
-                                :nick "emacs"
-                                :use-tls t
-                                :port "6697"
-                                :pass (lambda (fetch-password
-                                               :login "emacs"
-                                               :machine "irc.armaanb.net"
-                                               :port 6697)))))
-    (circe-default-part-message "goodbye!"))
+      (use-package circe
+        :config
+        (enable-lui-track)
+        (enable-circe-color-nicks)
+        (circe "libera")
+        (circe "oftc")
+        (circe "tilde")
+        (setq circe-networks '(("libera"
+                                 :host "irc.armaanb.net"
+                                 :nick "emacs"
+                                 :use-tls t
+                                 :port "6698"
+                                 :pass (lambda (null) (fetch-password
+                                                :login "emacs"
+                                                :machine "irc.armaanb.net"
+                                                :port 6698)))
+                               ("oftc"
+                                 :host "irc.armaanb.net"
+                                 :nick "emacs"
+                                 :use-tls t
+                                 :port "6699"
+                                 :pass (lambda (null) (fetch-password
+                                                :login "emacs"
+                                                :machine "irc.armaanb.net"
+                                                :port 6699)))
+                               ("tilde"
+                                 :host "irc.armaanb.net"
+                                 :nick "emacs"
+                                 :use-tls t
+                                 :port "6696"
+                                 :pass (lambda (null) (fetch-password
+                                                :login "emacs"
+                                                :machine "irc.armaanb.net"
+                                                :port 6696)))
+    ))
+        :custom (circe-default-part-message "goodbye!"))
 #+end_src
 * Emacs IDE
 ** Code cleanup
@@ -782,7 +802,7 @@ No more clogging up init.el.
 **** Programs
 #+begin_src conf :tangle ~/.spectrwm.conf
   program[email] = emacsclient -c --eval "(mu4e)"
-  program[irc] = emacsclient -c --eval '(switch-to-buffer "irc.armaanb.net:6697")'
+  program[irc] = emacsclient -c --eval '(switch-to-buffer "irc.armaanb.net:6698")'
   program[rss] = emacsclient -c --eval '(elfeed)'
   program[emacs] = emacsclient -c
   program[firefox] = firefox