 (defun +irc/quit ()
   "Kill current circe session and workgroup."
   (interactive)
-  (if (y-or-n-p "Really kill IRC session?")
-      (let (circe-channel-killed-confirmation
-            circe-server-killed-confirmation)
-        (when +irc--defer-timer
-          (cancel-timer +irc--defer-timer))
-        (disable-circe-notifications)
-        (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t))
-        (when (equal (+workspace-current-name) +irc--workspace-name)
-          (+workspace/delete +irc--workspace-name)))
-    (message "Aborted")))
+  (unless (y-or-n-p "Really kill IRC session?")
+    (user-error "Aborted"))
+  (let (circe-channel-killed-confirmation
+        circe-server-killed-confirmation)
+    (when +irc--defer-timer
+      (cancel-timer +irc--defer-timer))
+    (disable-circe-notifications)
+    (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t))
+    (when (featurep! :ui workspaces)
+      (when (equal (+workspace-current-name) +irc--workspace-name)
+        (+workspace/delete +irc--workspace-name)))))
 
 ;;;###autoload
 (defun +irc/ivy-jump-to-channel (&optional this-server)

(defun +circe-buffer-p (buf)
  "Return non-nil if BUF is a `circe-mode' buffer."
  (with-current-buffer buf
    (and (derived-mode-p 'circe-mode)
         (eq (safe-persp-name (get-current-persp))
             +irc--workspace-name))))

;;;###autoload
(defun +irc--add-circe-buffer-to-persp-h ()
  (when (bound-and-true-p persp-mode)
    (let ((persp (get-current-persp))
          (buf (current-buffer)))
      ;; Add a new circe buffer to irc workspace when we're in another workspace


;;;###autoload
(defun +irc/tracking-next-buffer ()
  "Disables switching to an unread buffer unless in the irc workspace."
  (interactive)
  (when (derived-mode-p 'circe-mode)
    (tracking-next-buffer)))
