]> code.delx.au - gnu-emacs/blobdiff - lisp/erc/erc-netsplit.el
Use cl-lib instead of cl, and interactive-p => called-interactively-p.
[gnu-emacs] / lisp / erc / erc-netsplit.el
index 5bcb4327c18708b91083510966741a135a6eaa5c..cbaf62b1a614d924e8be960efcc86e5146d99958 100644 (file)
@@ -1,16 +1,17 @@
 ;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits
 
-;; Copyright (C) 2002, 2003, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <mlang@delysid.org>
+;; Maintainer: FSF
 ;; Keywords: comm
 
 ;; This file is part of GNU Emacs.
 
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; 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 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 ;; GNU General Public License for more details.
 
 ;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Commentary:
 
 ;; This module hides quit/join messages if a netsplit occurs.
-;; To enable, add the following to your ~/.emacs:
+;; To enable, add the following to your init file:
 ;; (require 'erc-netsplit)
 ;; (erc-netsplit-mode 1)
 
 ;;; Code:
 
 (require 'erc)
-(eval-when-compile (require 'cl))
 
 (defgroup erc-netsplit nil
   "Netsplit detection tries to automatically figure when a
@@ -108,7 +106,7 @@ join from that split has been detected or not.")
     (dolist (elt erc-netsplit-list)
       (if (member nick (nthcdr 3 elt))
          (progn
-           (if (not (caddr elt))
+           (if (not (nth 2 elt))
                (progn
                  (erc-display-message
                   parsed 'notice (process-buffer proc)
@@ -150,7 +148,7 @@ join from that split has been detected or not.")
          ;; element for this netsplit exists already
          (progn
            (setcdr (nthcdr 2 ass) (cons nick (nthcdr 3 ass)))
-           (when (caddr ass) 
+           (when (nth 2 ass)
              ;; There was already a netjoin for this netsplit, it
              ;; seems like the old one didn't get finished...
              (erc-display-message 
@@ -195,7 +193,7 @@ join from that split has been detected or not.")
         nil 'notice 'active
         'netsplit-wholeft ?s (car elt)
         ?n (mapconcat 'erc-extract-nick (nthcdr 3 elt) " ")
-        ?t (if (caddr elt)
+        ?t (if (nth 2 elt)
                "(joining)"
              "")))))
   t)
@@ -211,4 +209,3 @@ join from that split has been detected or not.")
 ;; tab-width: 8
 ;; End:
 
-;; arch-tag: 61a85cb0-7e7b-4312-a4f6-313c7a25a6e8