app/irc: fix & improve feedback from =irc #1121

Hopefully prevents =irc from nooping.
This commit is contained in:
Henrik Lissner 2019-02-16 17:00:31 -05:00
parent ffcfde71d9
commit 5b48c21762
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -20,13 +20,17 @@
If INHIBIT-WORKSPACE (the universal argument) is non-nil, don't spawn a new If INHIBIT-WORKSPACE (the universal argument) is non-nil, don't spawn a new
workspace for it." workspace for it."
(interactive "P") (interactive "P")
(if (+workspace-exists-p +irc--workspace-name) (cond ((and (featurep! :feature workspaces)
(+workspace-switch +irc--workspace-name) (+workspace-exists-p +irc--workspace-name))
(and (+irc-setup-wconf inhibit-workspace) (+workspace-switch +irc--workspace-name))
(if circe-network-options ((not (+irc-setup-wconf inhibit-workspace))
(cl-loop for network in circe-network-options (user-error "Couldn't start up a workspace for IRC")))
collect (circe (car network))) (if (doom-buffers-in-mode 'circe-mode (buffer-list) t)
(quiet! (call-interactively #'circe)))))) (message "Circe buffers are already open")
(if circe-network-options
(cl-loop for network in circe-network-options
collect (circe (car network)))
(call-interactively #'circe))))
;;;###autoload ;;;###autoload
(defun +irc/connect (&optional inhibit-workspace) (defun +irc/connect (&optional inhibit-workspace)