Mercurial > emacs
comparison lisp/net/rcirc.el @ 105611:01e892771abe
Ryan Yeske <rcyeske at gmail.com>
(rcirc-view-log-file): New command.
(rcirc-track-minor-mode-map): Remove C-c ` binding.
(rcirc-authenticate, rcirc-authinfo): Allow nickserv-nick to be specified.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 15 Oct 2009 06:50:34 +0000 |
parents | bd2966850aac |
children | a9352fba1fd2 |
comparison
equal
deleted
inserted
replaced
105610:de20e5d8f6eb | 105611:01e892771abe |
---|---|
191 and a method symbol followed by method specific arguments. | 191 and a method symbol followed by method specific arguments. |
192 | 192 |
193 The valid METHOD symbols are `nickserv', `chanserv' and | 193 The valid METHOD symbols are `nickserv', `chanserv' and |
194 `bitlbee'. | 194 `bitlbee'. |
195 | 195 |
196 The required ARGUMENTS for each METHOD symbol are: | 196 The ARGUMENTS for each METHOD symbol are: |
197 `nickserv': NICK PASSWORD | 197 `nickserv': NICK PASSWORD [NICKSERV-NICK] |
198 `chanserv': NICK CHANNEL PASSWORD | 198 `chanserv': NICK CHANNEL PASSWORD |
199 `bitlbee': NICK PASSWORD | 199 `bitlbee': NICK PASSWORD |
200 | 200 |
201 Example: | 201 Examples: |
202 ((\"freenode\" nickserv \"bob\" \"p455w0rd\") | 202 ((\"freenode\" nickserv \"bob\" \"p455w0rd\") |
203 (\"freenode\" chanserv \"bob\" \"#bobland\" \"passwd99\") | 203 (\"freenode\" chanserv \"bob\" \"#bobland\" \"passwd99\") |
204 (\"bitlbee\" bitlbee \"robert\" \"sekrit\"))" | 204 (\"bitlbee\" bitlbee \"robert\" \"sekrit\") |
205 (\"dal.net\" nickserv \"bob\" \"sekrit\" \"NickServ@services.dal.net\"))" | |
205 :type '(alist :key-type (string :tag "Server") | 206 :type '(alist :key-type (string :tag "Server") |
206 :value-type (choice (list :tag "NickServ" | 207 :value-type (choice (list :tag "NickServ" |
207 (const nickserv) | 208 (const nickserv) |
208 (string :tag "Nick") | 209 (string :tag "Nick") |
209 (string :tag "Password")) | 210 (string :tag "Password")) |
1536 (with-temp-buffer | 1537 (with-temp-buffer |
1537 (insert (cdr cell)) | 1538 (insert (cdr cell)) |
1538 (write-region (point-min) (point-max) filename t 'quiet)))) | 1539 (write-region (point-min) (point-max) filename t 'quiet)))) |
1539 (setq rcirc-log-alist nil)) | 1540 (setq rcirc-log-alist nil)) |
1540 | 1541 |
1542 (defun rcirc-view-log-file () | |
1543 "View logfile corresponding to the current buffer." | |
1544 (interactive) | |
1545 (find-file-other-window | |
1546 (expand-file-name (funcall rcirc-log-filename-function | |
1547 (rcirc-buffer-process) rcirc-target) | |
1548 rcirc-log-directory))) | |
1549 | |
1541 (defun rcirc-join-channels (process channels) | 1550 (defun rcirc-join-channels (process channels) |
1542 "Join CHANNELS." | 1551 "Join CHANNELS." |
1543 (save-window-excursion | 1552 (save-window-excursion |
1544 (dolist (channel channels) | 1553 (dolist (channel channels) |
1545 (with-rcirc-process-buffer process | 1554 (with-rcirc-process-buffer process |
1626 | 1635 |
1627 ;;; activity tracking | 1636 ;;; activity tracking |
1628 (defvar rcirc-track-minor-mode-map (make-sparse-keymap) | 1637 (defvar rcirc-track-minor-mode-map (make-sparse-keymap) |
1629 "Keymap for rcirc track minor mode.") | 1638 "Keymap for rcirc track minor mode.") |
1630 | 1639 |
1631 (define-key rcirc-track-minor-mode-map (kbd "C-c `") 'rcirc-next-active-buffer) | |
1632 (define-key rcirc-track-minor-mode-map (kbd "C-c C-@") 'rcirc-next-active-buffer) | 1640 (define-key rcirc-track-minor-mode-map (kbd "C-c C-@") 'rcirc-next-active-buffer) |
1633 (define-key rcirc-track-minor-mode-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer) | 1641 (define-key rcirc-track-minor-mode-map (kbd "C-c C-SPC") 'rcirc-next-active-buffer) |
1634 | 1642 |
1635 ;;;###autoload | 1643 ;;;###autoload |
1636 (define-minor-mode rcirc-track-minor-mode | 1644 (define-minor-mode rcirc-track-minor-mode |
2551 (method (cadr i)) | 2559 (method (cadr i)) |
2552 (args (cdddr i))) | 2560 (args (cdddr i))) |
2553 (when (and (string-match server rcirc-server) | 2561 (when (and (string-match server rcirc-server) |
2554 (string-match nick rcirc-nick)) | 2562 (string-match nick rcirc-nick)) |
2555 (cond ((equal method 'nickserv) | 2563 (cond ((equal method 'nickserv) |
2564 (let ((password (car args)) | |
2565 (nickserv-nick (or (cadr args) "nickserv"))) | |
2556 (rcirc-send-string | 2566 (rcirc-send-string |
2557 process | 2567 process |
2558 (concat | 2568 (concat "PRIVMSG " nickserv-nick " :identify " |
2559 "PRIVMSG nickserv :identify " | 2569 password)))) |
2560 (car args)))) | |
2561 ((equal method 'chanserv) | 2570 ((equal method 'chanserv) |
2562 (rcirc-send-string | 2571 (rcirc-send-string |
2563 process | 2572 process |
2564 (concat | 2573 (concat |
2565 "PRIVMSG chanserv :identify " | 2574 "PRIVMSG chanserv :identify " |