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
workspace for it."
(interactive "P")
(if (+workspace-exists-p +irc--workspace-name)
(+workspace-switch +irc--workspace-name)
(and (+irc-setup-wconf inhibit-workspace)
(cond ((and (featurep! :feature workspaces)
(+workspace-exists-p +irc--workspace-name))
(+workspace-switch +irc--workspace-name))
((not (+irc-setup-wconf inhibit-workspace))
(user-error "Couldn't start up a workspace for IRC")))
(if (doom-buffers-in-mode 'circe-mode (buffer-list) t)
(message "Circe buffers are already open")
(if circe-network-options
(cl-loop for network in circe-network-options
collect (circe (car network)))
(quiet! (call-interactively #'circe))))))
(call-interactively #'circe))))
;;;###autoload
(defun +irc/connect (&optional inhibit-workspace)