app/irc: use SERVER for :host if no host is specified

This commit is contained in:
Henrik Lissner 2019-12-27 00:30:13 -05:00
parent 01e728dad5
commit ac336a55ea
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -1,9 +1,17 @@
;;; app/irc/autoload/settings.el -*- lexical-binding: t; -*-
;;;###autodef
(defun set-irc-server! (server letvars)
(defun set-irc-server! (server plist)
"Registers an irc SERVER for circe.
SERVER can either be a name for the network (in which case you must specify a
:host), or it may be the hostname itself, in which case it will be used as the
:host.
See `circe-network-options' for details."
(after! circe
(push (cons server letvars) circe-network-options)))
(unless (plist-member plist :host)
(plist-put! plist :host server))
(setf (alist-get server circe-network-options
nil nil #'equal)
plist)))