erc / erc-netsplit.el

Diff from to


 (define-erc-module netsplit nil
   "This mode hides quit/join messages if a netsplit occurs."
-   (add-hook 'erc-server-JOIN-hook 'erc-netsplit-JOIN)
-   (add-hook 'erc-server-MODE-hook 'erc-netsplit-MODE)
-   (add-hook 'erc-server-QUIT-hook 'erc-netsplit-QUIT)
+   (add-hook 'erc-server-JOIN-functions 'erc-netsplit-JOIN)
+   (add-hook 'erc-server-MODE-functions 'erc-netsplit-MODE)
+   (add-hook 'erc-server-QUIT-functions 'erc-netsplit-QUIT)
    (add-hook 'erc-timer-hook 'erc-netsplit-timer))
-  ((remove-hook 'erc-server-JOIN-hook 'erc-netsplit-JOIN)
-   (remove-hook 'erc-server-MODE-hook 'erc-netsplit-MODE)
-   (remove-hook 'erc-server-QUIT-hook 'erc-netsplit-QUIT)
+  ((remove-hook 'erc-server-JOIN-functions 'erc-netsplit-JOIN)
+   (remove-hook 'erc-server-MODE-functions 'erc-netsplit-MODE)
+   (remove-hook 'erc-server-QUIT-functions 'erc-netsplit-QUIT)
    (remove-hook 'erc-timer-hook 'erc-netsplit-timer)))
 (defcustom erc-netsplit-show-server-mode-changes-flag nil
 (defun erc-netsplit-JOIN (proc parsed)
   "Show/don't show rejoins."
-  (let ((nick (aref parsed 1))
+  (let ((nick (erc-response.sender parsed))
 	(no-next-hook nil))
     (dolist (elt erc-netsplit-list)
       (if (member nick (nthcdr 3 elt))
 (defun erc-netsplit-MODE (proc parsed)
   "Hide mode changes from servers."
   ;; regexp matches things with a . in them, and no ! or @ in them.
-  (when (string-match "^[^@!]+\\.[^@!]+$" (aref parsed 1))
+  (when (string-match "^[^@!]+\\.[^@!]+$" (erc-response.sender parsed))
     (and erc-netsplit-debug
 	  parsed 'notice (process-buffer proc)
 (defun erc-netsplit-QUIT (proc parsed)
   "Detect netsplits."
-  (let ((split (aref parsed 2))
-	(nick (aref parsed 1))
+  (let ((split (erc-response.contents parsed))
+	(nick (erc-response.sender parsed))
     (when (string-match erc-netsplit-regexp split)
       (setq ass (assoc split erc-netsplit-list))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.