Mercurial > emacs
changeset 87687:aef7ff97a0c2
ERC: Sync changes from upstream.
author | Michael Olson <mwolson@gnu.org> |
---|---|
date | Thu, 10 Jan 2008 03:51:14 +0000 |
parents | a7108d800053 |
children | d896cd0ecab5 |
files | lisp/erc/ChangeLog lisp/erc/erc-backend.el lisp/erc/erc-services.el |
diffstat | 3 files changed, 56 insertions(+), 45 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/erc/ChangeLog Wed Jan 09 20:16:14 2008 +0000 +++ b/lisp/erc/ChangeLog Thu Jan 10 03:51:14 2008 +0000 @@ -3,6 +3,21 @@ * erc-ibuffer.el (erc-channel-modes): Pass mode-name through format-mode-line +2007-12-16 Diane Murray <disumu@x3y2z1.net> + + * erc-services.el (erc-nickserv-alist): Removed autodetect regexp, + added identified regexp for OFTC. + (erc-nickserv-identification-autodetect): Make sure success-regex + is non-nil. + (erc-nickserv-identify-autodetect): Make sure identify-regex is + non-nil. Doc fix. + +2007-12-13 Diane Murray <disumu@x3y2z1.net> + + * erc-backend.el (PRIVMSG, QUIT, TOPIC, WALLOPS, 376, 004, 221) + (312, 315, 319, 330, 331, 333, 367, 368, 391, 405, 406, 412) + (421, 432, 433, 437, 442, 461, 474, 477, 482, 431): Doc fix. + 2007-12-09 Michael Olson <mwolson@gnu.org> * erc-services.el (erc-nickserv-alist): Fix regexps for GRnet.
--- a/lisp/erc/erc-backend.el Wed Jan 09 20:16:14 2008 +0000 +++ b/lisp/erc/erc-backend.el Thu Jan 10 03:51:14 2008 +0000 @@ -1349,7 +1349,7 @@ (erc-update-mode-line)))) (define-erc-response-handler (PRIVMSG NOTICE) - nil nil + "Handle private messages, including messages in channels." nil (let ((sender-spec (erc-response.sender parsed)) (cmd (erc-response.command parsed)) (tgt (car (erc-response.command-args parsed))) @@ -1413,7 +1413,7 @@ (add-hook 'erc-server-PRIVMSG-functions 'erc-auto-query) (define-erc-response-handler (QUIT) - nil nil + "Another user has quit IRC." nil (let ((reason (erc-response.contents parsed)) bufs) (multiple-value-bind (nick login host) @@ -1426,7 +1426,7 @@ ?h host ?r reason)))) (define-erc-response-handler (TOPIC) - nil nil + "The channel topic has changed." nil (let* ((ch (first (erc-response.command-args parsed))) (topic (erc-trim-string (erc-response.contents parsed))) (time (format-time-string "%T %m/%d/%y" (current-time)))) @@ -1439,7 +1439,7 @@ ?c ch ?T topic)))) (define-erc-response-handler (WALLOPS) - nil nil + "Display a WALLOPS message." nil (let ((message (erc-response.contents parsed))) (multiple-value-bind (nick login host) (erc-parse-user (erc-response.sender parsed)) @@ -1465,12 +1465,12 @@ (erc-response.contents parsed))) (define-erc-response-handler (376 422) - nil nil + "End of MOTD/MOTD is missing." nil (erc-server-MOTD proc parsed) (erc-connection-established proc parsed)) (define-erc-response-handler (004) - nil nil + "Display the server's identification." nil (multiple-value-bind (server-name server-version) (cdr (erc-response.command-args parsed)) (setq erc-server-version server-version) @@ -1510,7 +1510,7 @@ (erc-display-message parsed 'notice proc line))) (define-erc-response-handler (221) - nil nil + "Display the current user modes." nil (let* ((nick (first (erc-response.command-args parsed))) (modes (mapconcat 'identity (cdr (erc-response.command-args parsed)) " "))) @@ -1596,7 +1596,7 @@ ?n nick ?f fname ?u user ?h host)))) (define-erc-response-handler (312) - nil nil + "Server name response in WHOIS." nil (multiple-value-bind (nick server-host) (cdr (erc-response.command-args parsed)) (erc-display-message @@ -1614,7 +1614,7 @@ ;; 318 - End of WHOIS list ;; 323 - End of channel LIST ;; 369 - End of WHOWAS - nil nil + "End of WHO/WHOIS/LIST/WHOWAS notices." nil (ignore proc parsed)) (define-erc-response-handler (317) @@ -1635,7 +1635,7 @@ ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle)))))) (define-erc-response-handler (319) - nil nil + "Channel names in WHOIS response." nil (erc-display-message parsed 'notice 'active 's319 ?n (second (erc-response.command-args parsed)) @@ -1683,7 +1683,7 @@ 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time)))) (define-erc-response-handler (330) - nil nil + "Nick is authed as (on Quakenet network)." nil ;; FIXME: I don't know what the magic numbers mean. Mummy, make ;; the magic numbers go away. ;; No seriously, I have no clue about the format of this command, @@ -1699,10 +1699,9 @@ ?n nick ?a authmsg ?i authaccount))) (define-erc-response-handler (331) - "Channel topic." nil + "No topic set for channel." nil (let ((channel (second (erc-response.command-args parsed))) (topic (erc-response.contents parsed))) - ;; FIXME: why don't we do anything with the topic? -- Lawrence 2004/05/10 (erc-display-message parsed 'notice (erc-get-buffer channel proc) 's331 ?c channel))) @@ -1715,8 +1714,7 @@ 's332 ?c channel ?T topic))) (define-erc-response-handler (333) - ;; Who set the topic, and when - nil nil + "Who set the topic, and when." nil (multiple-value-bind (channel nick time) (cdr (erc-response.command-args parsed)) (setq time (format-time-string "%T %Y/%m/%d" @@ -1766,7 +1764,7 @@ (erc-channel-end-receiving-names))) (define-erc-response-handler (367) - "Channel ban list entries" nil + "Channel ban list entries." nil (multiple-value-bind (channel banmask setter time) (cdr (erc-response.command-args parsed)) ;; setter and time are not standard @@ -1781,7 +1779,7 @@ ?b banmask)))) (define-erc-response-handler (368) - "End of channel ban list" nil + "End of channel ban list." nil (let ((channel (second (erc-response.command-args parsed)))) (erc-display-message parsed 'notice 'active 's368 ?c channel))) @@ -1797,7 +1795,7 @@ 's379 ?c from ?f to))) (define-erc-response-handler (391) - "Server's time string" nil + "Server's time string." nil (erc-display-message parsed 'notice 'active 's391 ?s (second (erc-response.command-args parsed)) @@ -1824,56 +1822,47 @@ (define-erc-response-handler (405) - ;; Can't join that many channels. - nil nil + "Can't join that many channels." nil (erc-display-message parsed '(notice error) 'active 's405 ?c (second (erc-response.command-args parsed)))) (define-erc-response-handler (406) - ;; No such nick - nil nil + "No such nick." nil (erc-display-message parsed '(notice error) 'active 's406 ?n (second (erc-response.command-args parsed)))) (define-erc-response-handler (412) - ;; No text to send - nil nil + "No text to send." nil (erc-display-message parsed '(notice error) 'active 's412)) (define-erc-response-handler (421) - ;; Unknown command - nil nil + "Unknown command." nil (erc-display-message parsed '(notice error) 'active 's421 ?c (second (erc-response.command-args parsed)))) (define-erc-response-handler (432) - ;; Bad nick. - nil nil + "Bad nick." nil (erc-display-message parsed '(notice error) 'active 's432 ?n (second (erc-response.command-args parsed)))) (define-erc-response-handler (433) - ;; Login-time "nick in use" - nil nil + "Login-time \"nick in use\"." nil (erc-nickname-in-use (second (erc-response.command-args parsed)) "already in use")) (define-erc-response-handler (437) - ;; Nick temporarily unavailable (IRCnet) - nil nil + "Nick temporarily unavailable (on IRCnet)." nil (let ((nick/channel (second (erc-response.command-args parsed)))) (unless (erc-channel-p nick/channel) (erc-nickname-in-use nick/channel "temporarily unavailable")))) (define-erc-response-handler (442) - ;; Not on channel - nil nil + "Not on channel." nil (erc-display-message parsed '(notice error) 'active 's442 ?c (second (erc-response.command-args parsed)))) (define-erc-response-handler (461) - ;; Not enough params for command. - nil nil + "Not enough parameters for command." nil (erc-display-message parsed '(notice error) 'active 's461 ?c (second (erc-response.command-args parsed)) ?m (erc-response.contents parsed))) @@ -1887,7 +1876,7 @@ (erc-response.contents parsed))) (define-erc-response-handler (474) - "Banned from channel errors" nil + "Banned from channel errors." nil (erc-display-message parsed '(notice error) nil (intern (format "s%s" (erc-response.command parsed))) @@ -1906,14 +1895,14 @@ (erc-cmd-JOIN channel key))))) (define-erc-response-handler (477) - nil nil + "Channel doesn't support modes." nil (let ((channel (second (erc-response.command-args parsed))) (message (erc-response.contents parsed))) (erc-display-message parsed 'notice (erc-get-buffer channel proc) (format "%s: %s" channel message)))) (define-erc-response-handler (482) - nil nil + "You need to be a channel operator to do that." nil (let ((channel (second (erc-response.command-args parsed))) (message (erc-response.contents parsed))) (erc-display-message parsed '(error notice) 'active 's482 @@ -1935,7 +1924,9 @@ ;; 491 - No O-lines for your host ;; 501 - Unknown MODE flag ;; 502 - Cannot change mode for other users - nil nil + "Generic display of server error messages. + +See `erc-display-error-notice'." nil (erc-display-error-notice parsed (intern (format "s%s" (erc-response.command parsed)))))
--- a/lisp/erc/erc-services.el Wed Jan 09 20:16:14 2008 +0000 +++ b/lisp/erc/erc-services.el Thu Jan 10 03:51:14 2008 +0000 @@ -227,6 +227,8 @@ "IDENTIFY" nil nil nil) (freenode "NickServ!NickServ@services." + ;; freenode also accepts a password at login, see the `erc' + ;; :password argument. "/msg\\s-NickServ\\s-IDENTIFY\\s-<password>" "NickServ" "IDENTIFY" nil nil @@ -249,9 +251,11 @@ "IDENTIFY" nil "SQUERY" nil) (OFTC "NickServ!services@services.oftc.net" - "type\\s-/msg\\s-NickServ\\s-IDENTIFY\\s-password." + ;; OFTC's NickServ doesn't ask you to identify anymore. + nil "NickServ" - "IDENTIFY" nil nil nil) + "IDENTIFY" nil nil + "You\\s-are\\s-successfully\\s-identified\\s-as\\s-") (QuakeNet nil nil "Q@CServe.quakenet.org" @@ -334,15 +338,15 @@ ;; continue only if we're sure it's the real nickserv for this network ;; and it's told us we've successfully identified (when (and sender (equal sspec sender) + success-regex (string-match success-regex msg)) (erc-log "NickServ IDENTIFY success notification detected") (run-hook-with-args 'erc-nickserv-identified-hook network nick) nil))) (defun erc-nickserv-identify-autodetect (proc parsed) - "Check for a NickServ identify request everytime a notice is received. -Make sure it is the real NickServ for this network and that it has -specifically asked the user to IDENTIFY. + "Identify to NickServ when an identify request is received. +Make sure it is the real NickServ for this network. If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the password for this nickname, otherwise try to send it automatically." (unless (and (null erc-nickserv-passwords) @@ -356,6 +360,7 @@ ;; continue only if we're sure it's the real nickserv for this network ;; and it's asked us to identify (when (and sender (equal sspec sender) + identify-regex (string-match identify-regex msg)) (erc-log "NickServ IDENTIFY request detected") (erc-nickserv-call-identify-function nick)