Source

erc / erc-notify.el

Diff from to

erc-notify.el

   "Periodically check for the online status of certain users and report
 changes."
   ((add-hook 'erc-timer-hook 'erc-notify-timer)
-   (add-hook 'erc-server-JOIN-hook 'erc-notify-JOIN)
-   (add-hook 'erc-server-NICK-hook 'erc-notify-NICK)
-   (add-hook 'erc-server-QUIT-hook 'erc-notify-QUIT))
+   (add-hook 'erc-server-JOIN-functions 'erc-notify-JOIN)
+   (add-hook 'erc-server-NICK-functions 'erc-notify-NICK)
+   (add-hook 'erc-server-QUIT-functions 'erc-notify-QUIT))
   ((remove-hook 'erc-timer-hook 'erc-notify-timer)
-   (remove-hook 'erc-server-JOIN-hook 'erc-notify-JOIN)
-   (remove-hook 'erc-server-NICK-hook 'erc-notify-NICK)
-   (remove-hook 'erc-server-QUIT-hook 'erc-notify-QUIT)))
+   (remove-hook 'erc-server-JOIN-functions 'erc-notify-JOIN)
+   (remove-hook 'erc-server-NICK-functions 'erc-notify-NICK)
+   (remove-hook 'erc-server-QUIT-functions 'erc-notify-QUIT)))
 
 ;;;; Timer handler
 
 		erc-notify-interval))
     (erc-once-with-server-event
      303
-     '(let* ((server (aref parsed 1))
-	     (ison-list (delete "" (split-string (aref parsed 3))))
+     '(let* ((server (erc-response.sender parsed))
+	     (ison-list (delete "" (split-string (erc-response.contents parsed))))
 	     (new-list ison-list)
 	     (old-list (with-current-buffer (erc-server-buffer)
 			 erc-last-ison)))
   "Check if channel joiner is on `erc-notify-list' and not on `erc-last-ison'.
 If this condition is satisfied, produce a notify_on message and add the nick
 to `erc-last-ison' to prevent any further notifications."
-  (let ((nick (erc-extract-nick (aref parsed 1))))
+  (let ((nick (erc-extract-nick (erc-response.sender parsed))))
     (when (and (erc-member-ignore-case nick erc-notify-list)
 	       (not (erc-member-ignore-case nick erc-last-ison)))
       (add-to-list 'erc-last-ison nick)
   "Check if new nick is on `erc-notify-list' and not on `erc-last-ison'.
 If this condition is satisfied, produce a notify_on message and add the nick
 to `erc-last-ison' to prevent any further notifications."
-  (let ((nick (aref parsed 2)))
+  (let ((nick (erc-response.contents parsed)))
     (when (and (erc-member-ignore-case nick erc-notify-list)
 	       (not (erc-member-ignore-case nick erc-last-ison)))
       (add-to-list 'erc-last-ison nick)
   "Check if quitter is on `erc-notify-list' and on `erc-last-ison'.
 If this condition is satisfied, produce a notify_off message and remove the
 nick from `erc-last-ison' to prevent any further notifications."
-  (let ((nick (erc-extract-nick (aref parsed 1))))
+  (let ((nick (erc-extract-nick (erc-response.sender parsed))))
     (when (and (erc-member-ignore-case nick erc-notify-list)
 	       (erc-member-ignore-case nick erc-last-ison))
       (setq erc-last-ison (delete (find nick erc-last-ison
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 ProjectModifiedEvent.java.
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.