forked from FG42/FG42
47 lines
1.4 KiB
EmacsLisp
47 lines
1.4 KiB
EmacsLisp
;;; IrcCubes --- The IRC related cubes for FG42 -*- lexical-binding: t; -*-
|
|
;;
|
|
;; Copyright (c) 2010-2021 Sameer Rahmani & Contributors
|
|
;;
|
|
;; Author: Sameer Rahmani <lxsameer@gnu.org>
|
|
;; URL: https://gitlab.com/FG42/FG42
|
|
;; Version: 3.0.0
|
|
;;
|
|
;; This program is free software; you can redistribute it and/or modify
|
|
;; it under the terms of the GNU General Public License as published by
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
;; (at your option) any later version.
|
|
;;
|
|
;; This program is distributed in the hope that it will be useful,
|
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
;; GNU General Public License for more details.
|
|
;;
|
|
;; You should have received a copy of the GNU General Public License
|
|
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
;;
|
|
;;; Commentary:
|
|
;;; Code:
|
|
|
|
|
|
(defvar fg42/default-rcirc-servers
|
|
'(("irc.libera.chat/6697"
|
|
:channels ("#fg42"))))
|
|
|
|
(defun fg42/rcirc-connect ()
|
|
"Connect to IRC servers."
|
|
(interactive)
|
|
(require 'rcirc)
|
|
|
|
(let ((servers (or (plist-get fg42/rcirc-cube-params :server)
|
|
fg42/default-rcirc-servers)))
|
|
(setq rcirc-enable-authinfo-support t)
|
|
(setq rcirc-server-alist servers)
|
|
(add-hook 'rcirc-mode-hook
|
|
(lambda ()
|
|
(rcirc-track-minor-mode 1)))
|
|
(irc nil)))
|
|
|
|
|
|
(provide 'cubes/irc/core)
|
|
;;; core.el ends here
|