Created
October 3, 2010 12:52
-
-
Save ivey/608556 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun erc-cmd-UNTRACK (&optional target) | |
"Add TARGET to the list of target to be tracked." | |
(if target | |
(erc-with-server-buffer | |
(let ((untracked (car (erc-member-ignore-case target erc-track-exclude)))) | |
(if untracked | |
(erc-display-line | |
(erc-make-notice (format "%s is not currently tracked!" target)) | |
'active) | |
(add-to-list 'erc-track-exclude target) | |
(erc-display-line | |
(erc-make-notice (format "Now not tracking %s" target)) | |
'active)))) | |
(if (null erc-track-exclude) | |
(erc-display-line (erc-make-notice "Untracked targets list is empty") 'active) | |
(erc-display-line (erc-make-notice "Untracked targets list:") 'active) | |
(mapc #'(lambda (item) | |
(erc-display-line (erc-make-notice item) 'active)) | |
(erc-with-server-buffer erc-track-exclude)))) | |
t) | |
(defun erc-cmd-TRACK (target) | |
"Remove TARGET of the list of targets which they should not be tracked. | |
If no TARGET argument is specified, list the contents of `erc-track-exclude'." | |
(when target | |
(erc-with-server-buffer | |
(let ((tracked (not (car (erc-member-ignore-case target erc-track-exclude))))) | |
(if tracked | |
(erc-display-line | |
(erc-make-notice (format "%s is currently tracked!" target)) | |
'active) | |
(setq erc-track-exclude (remove target erc-track-exclude)) | |
(erc-display-line | |
(erc-make-notice (format "Now tracking %s" target)) | |
'active))))) | |
t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment