config/emacs: irc attempt 2

This commit is contained in:
Sakooooo 2024-10-07 22:03:49 +04:00
parent 299110e456
commit 50ec18ee92
Signed by: sako
GPG key ID: FE52FD65B76E4751

View file

@ -1102,6 +1102,29 @@ Will configure later, (use elfeed protocol ok ty)
(setq elfeed-protocol-enabled-protocols '(fever)) (setq elfeed-protocol-enabled-protocols '(fever))
(elfeed-protocol-enable)) (elfeed-protocol-enable))
#+end_src #+end_src
** IRC (erc)
#+begin_src emacs-lisp
(require 'erc)
(setq erc-server "znc.sako.box")
(setq erc-port "7000")
(setq erc-prompt "(^w^)->")
(defun sakomacs/erc-znc-detach-channel ()
(when (erc-server-process-alive)
(let ((tgt (erc-default-target)))
(erc-server-send (format "DETACH %s" tgt)
nil tgt))))
(add-hook 'erc-kill-channel-hook (sakomacs/erc-znc-detach-channel))
(defun sakomacs/begin-irc ()
(interactive)
(erc-tls :server "znc.sako.box" :port "7000" :nick "sako" :password (concat "sako@emacs/Libera:" (password-store-get "SelfHosted/ZNC"))))
(advice-add 'irc :override
(sakomacs/begin-irc))
#+end_src
** Matrix ** Matrix
Ill set this up later as well Ill set this up later as well
#+begin_src emacs-lisp #+begin_src emacs-lisp