X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/fec99105e2cb5ff47aa3c71c55eda771dc9c5eb2..f44407aa4bab98e037cd1728cafb5575a1bc0482:/lisp/erc/erc-netsplit.el diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index b4c26b1bb8..5bcb4327c1 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el @@ -1,6 +1,6 @@ ;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits -;; Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. ;; Author: Mario Lang ;; Keywords: comm @@ -9,7 +9,7 @@ ;; GNU Emacs is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2, or (at your option) +;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; GNU Emacs is distributed in the hope that it will be useful, @@ -173,13 +173,14 @@ join from that split has been detected or not.") (defun erc-netsplit-timer (now) "Clean cruft from `erc-netsplit-list' older than 10 minutes." - (dolist (elt erc-netsplit-list) - (when (> (erc-time-diff (cadr elt) now) 600) - (when erc-netsplit-debug - (erc-display-message - nil 'notice (current-buffer) - (concat "Netsplit: Removing " (car elt)))) - (setq erc-netsplit-list (delq elt erc-netsplit-list))))) + (when erc-server-connected + (dolist (elt erc-netsplit-list) + (when (> (erc-time-diff (cadr elt) now) 600) + (when erc-netsplit-debug + (erc-display-message + nil 'notice (current-buffer) + (concat "Netsplit: Removing " (car elt)))) + (setq erc-netsplit-list (delq elt erc-netsplit-list)))))) ;;;###autoload (defun erc-cmd-WHOLEFT ()