diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index 677b5f699..2fd86a0b3 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -35,6 +35,9 @@ (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) (mapcar #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t)) (when (equal (+workspace-current-name) +irc--workspace-name) (+workspace/delete +irc--workspace-name))) diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index 226f8619b..056124afa 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -28,6 +28,8 @@ playback.") `(cl-pushnew (cons ,server ,letvars) +irc-connections :test #'equal :key #'car)) +(defvar +irc--defer-timer nil) + ;; ;; Plugins @@ -141,7 +143,9 @@ playback.") :init (if +irc-defer-notifications (add-hook! 'circe-server-connected-hook - (run-at-time +irc-defer-notifications nil #'enable-circe-notifications)) + (setq +irc--defer-timer + (run-at-time +irc-defer-notifications nil + #'enable-circe-notifications))) (add-hook 'circe-server-connected-hook #'enable-circe-notifications)) :config (setq circe-notifications-watch-strings +irc-notifications-watch-strings