aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olson2008-01-10 03:51:14 +0000
committerMichael Olson2008-01-10 03:51:14 +0000
commit712e2b05e11b9f48e02f16890f916aa76a66ba50 (patch)
tree58121bb35afd2d5b367147d7166bc02b974f60f1
parentf9adf05bac8484b01da84f18e6053a074509384b (diff)
downloademacs-712e2b05e11b9f48e02f16890f916aa76a66ba50.tar.gz
emacs-712e2b05e11b9f48e02f16890f916aa76a66ba50.zip
ERC: Sync changes from upstream.
-rw-r--r--lisp/erc/ChangeLog15
-rw-r--r--lisp/erc/erc-backend.el71
-rw-r--r--lisp/erc/erc-services.el15
3 files changed, 56 insertions, 45 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index b7d1d1bfe30..2e8fb250018 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -3,6 +3,21 @@
3 * erc-ibuffer.el (erc-channel-modes): 3 * erc-ibuffer.el (erc-channel-modes):
4 Pass mode-name through format-mode-line 4 Pass mode-name through format-mode-line
5 5
62007-12-16 Diane Murray <disumu@x3y2z1.net>
7
8 * erc-services.el (erc-nickserv-alist): Removed autodetect regexp,
9 added identified regexp for OFTC.
10 (erc-nickserv-identification-autodetect): Make sure success-regex
11 is non-nil.
12 (erc-nickserv-identify-autodetect): Make sure identify-regex is
13 non-nil. Doc fix.
14
152007-12-13 Diane Murray <disumu@x3y2z1.net>
16
17 * erc-backend.el (PRIVMSG, QUIT, TOPIC, WALLOPS, 376, 004, 221)
18 (312, 315, 319, 330, 331, 333, 367, 368, 391, 405, 406, 412)
19 (421, 432, 433, 437, 442, 461, 474, 477, 482, 431): Doc fix.
20
62007-12-09 Michael Olson <mwolson@gnu.org> 212007-12-09 Michael Olson <mwolson@gnu.org>
7 22
8 * erc-services.el (erc-nickserv-alist): Fix regexps for GRnet. 23 * erc-services.el (erc-nickserv-alist): Fix regexps for GRnet.
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 0fead116d8f..5fe0efd1c94 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1349,7 +1349,7 @@ add things to `%s' instead."
1349 (erc-update-mode-line)))) 1349 (erc-update-mode-line))))
1350 1350
1351(define-erc-response-handler (PRIVMSG NOTICE) 1351(define-erc-response-handler (PRIVMSG NOTICE)
1352 nil nil 1352 "Handle private messages, including messages in channels." nil
1353 (let ((sender-spec (erc-response.sender parsed)) 1353 (let ((sender-spec (erc-response.sender parsed))
1354 (cmd (erc-response.command parsed)) 1354 (cmd (erc-response.command parsed))
1355 (tgt (car (erc-response.command-args parsed))) 1355 (tgt (car (erc-response.command-args parsed)))
@@ -1413,7 +1413,7 @@ add things to `%s' instead."
1413(add-hook 'erc-server-PRIVMSG-functions 'erc-auto-query) 1413(add-hook 'erc-server-PRIVMSG-functions 'erc-auto-query)
1414 1414
1415(define-erc-response-handler (QUIT) 1415(define-erc-response-handler (QUIT)
1416 nil nil 1416 "Another user has quit IRC." nil
1417 (let ((reason (erc-response.contents parsed)) 1417 (let ((reason (erc-response.contents parsed))
1418 bufs) 1418 bufs)
1419 (multiple-value-bind (nick login host) 1419 (multiple-value-bind (nick login host)
@@ -1426,7 +1426,7 @@ add things to `%s' instead."
1426 ?h host ?r reason)))) 1426 ?h host ?r reason))))
1427 1427
1428(define-erc-response-handler (TOPIC) 1428(define-erc-response-handler (TOPIC)
1429 nil nil 1429 "The channel topic has changed." nil
1430 (let* ((ch (first (erc-response.command-args parsed))) 1430 (let* ((ch (first (erc-response.command-args parsed)))
1431 (topic (erc-trim-string (erc-response.contents parsed))) 1431 (topic (erc-trim-string (erc-response.contents parsed)))
1432 (time (format-time-string "%T %m/%d/%y" (current-time)))) 1432 (time (format-time-string "%T %m/%d/%y" (current-time))))
@@ -1439,7 +1439,7 @@ add things to `%s' instead."
1439 ?c ch ?T topic)))) 1439 ?c ch ?T topic))))
1440 1440
1441(define-erc-response-handler (WALLOPS) 1441(define-erc-response-handler (WALLOPS)
1442 nil nil 1442 "Display a WALLOPS message." nil
1443 (let ((message (erc-response.contents parsed))) 1443 (let ((message (erc-response.contents parsed)))
1444 (multiple-value-bind (nick login host) 1444 (multiple-value-bind (nick login host)
1445 (erc-parse-user (erc-response.sender parsed)) 1445 (erc-parse-user (erc-response.sender parsed))
@@ -1465,12 +1465,12 @@ add things to `%s' instead."
1465 (erc-response.contents parsed))) 1465 (erc-response.contents parsed)))
1466 1466
1467(define-erc-response-handler (376 422) 1467(define-erc-response-handler (376 422)
1468 nil nil 1468 "End of MOTD/MOTD is missing." nil
1469 (erc-server-MOTD proc parsed) 1469 (erc-server-MOTD proc parsed)
1470 (erc-connection-established proc parsed)) 1470 (erc-connection-established proc parsed))
1471 1471
1472(define-erc-response-handler (004) 1472(define-erc-response-handler (004)
1473 nil nil 1473 "Display the server's identification." nil
1474 (multiple-value-bind (server-name server-version) 1474 (multiple-value-bind (server-name server-version)
1475 (cdr (erc-response.command-args parsed)) 1475 (cdr (erc-response.command-args parsed))
1476 (setq erc-server-version server-version) 1476 (setq erc-server-version server-version)
@@ -1510,7 +1510,7 @@ A server may send more than one 005 message."
1510 (erc-display-message parsed 'notice proc line))) 1510 (erc-display-message parsed 'notice proc line)))
1511 1511
1512(define-erc-response-handler (221) 1512(define-erc-response-handler (221)
1513 nil nil 1513 "Display the current user modes." nil
1514 (let* ((nick (first (erc-response.command-args parsed))) 1514 (let* ((nick (first (erc-response.command-args parsed)))
1515 (modes (mapconcat 'identity 1515 (modes (mapconcat 'identity
1516 (cdr (erc-response.command-args parsed)) " "))) 1516 (cdr (erc-response.command-args parsed)) " ")))
@@ -1596,7 +1596,7 @@ See `erc-display-server-message'." nil
1596 ?n nick ?f fname ?u user ?h host)))) 1596 ?n nick ?f fname ?u user ?h host))))
1597 1597
1598(define-erc-response-handler (312) 1598(define-erc-response-handler (312)
1599 nil nil 1599 "Server name response in WHOIS." nil
1600 (multiple-value-bind (nick server-host) 1600 (multiple-value-bind (nick server-host)
1601 (cdr (erc-response.command-args parsed)) 1601 (cdr (erc-response.command-args parsed))
1602 (erc-display-message 1602 (erc-display-message
@@ -1614,7 +1614,7 @@ See `erc-display-server-message'." nil
1614 ;; 318 - End of WHOIS list 1614 ;; 318 - End of WHOIS list
1615 ;; 323 - End of channel LIST 1615 ;; 323 - End of channel LIST
1616 ;; 369 - End of WHOWAS 1616 ;; 369 - End of WHOWAS
1617 nil nil 1617 "End of WHO/WHOIS/LIST/WHOWAS notices." nil
1618 (ignore proc parsed)) 1618 (ignore proc parsed))
1619 1619
1620(define-erc-response-handler (317) 1620(define-erc-response-handler (317)
@@ -1635,7 +1635,7 @@ See `erc-display-server-message'." nil
1635 ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle)))))) 1635 ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle))))))
1636 1636
1637(define-erc-response-handler (319) 1637(define-erc-response-handler (319)
1638 nil nil 1638 "Channel names in WHOIS response." nil
1639 (erc-display-message 1639 (erc-display-message
1640 parsed 'notice 'active 's319 1640 parsed 'notice 'active 's319
1641 ?n (second (erc-response.command-args parsed)) 1641 ?n (second (erc-response.command-args parsed))
@@ -1683,7 +1683,7 @@ See `erc-display-server-message'." nil
1683 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time)))) 1683 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time))))
1684 1684
1685(define-erc-response-handler (330) 1685(define-erc-response-handler (330)
1686 nil nil 1686 "Nick is authed as (on Quakenet network)." nil
1687 ;; FIXME: I don't know what the magic numbers mean. Mummy, make 1687 ;; FIXME: I don't know what the magic numbers mean. Mummy, make
1688 ;; the magic numbers go away. 1688 ;; the magic numbers go away.
1689 ;; No seriously, I have no clue about the format of this command, 1689 ;; No seriously, I have no clue about the format of this command,
@@ -1699,10 +1699,9 @@ See `erc-display-server-message'." nil
1699 ?n nick ?a authmsg ?i authaccount))) 1699 ?n nick ?a authmsg ?i authaccount)))
1700 1700
1701(define-erc-response-handler (331) 1701(define-erc-response-handler (331)
1702 "Channel topic." nil 1702 "No topic set for channel." nil
1703 (let ((channel (second (erc-response.command-args parsed))) 1703 (let ((channel (second (erc-response.command-args parsed)))
1704 (topic (erc-response.contents parsed))) 1704 (topic (erc-response.contents parsed)))
1705 ;; FIXME: why don't we do anything with the topic? -- Lawrence 2004/05/10
1706 (erc-display-message parsed 'notice (erc-get-buffer channel proc) 1705 (erc-display-message parsed 'notice (erc-get-buffer channel proc)
1707 's331 ?c channel))) 1706 's331 ?c channel)))
1708 1707
@@ -1715,8 +1714,7 @@ See `erc-display-server-message'." nil
1715 's332 ?c channel ?T topic))) 1714 's332 ?c channel ?T topic)))
1716 1715
1717(define-erc-response-handler (333) 1716(define-erc-response-handler (333)
1718 ;; Who set the topic, and when 1717 "Who set the topic, and when." nil
1719 nil nil
1720 (multiple-value-bind (channel nick time) 1718 (multiple-value-bind (channel nick time)
1721 (cdr (erc-response.command-args parsed)) 1719 (cdr (erc-response.command-args parsed))
1722 (setq time (format-time-string "%T %Y/%m/%d" 1720 (setq time (format-time-string "%T %Y/%m/%d"
@@ -1766,7 +1764,7 @@ See `erc-display-server-message'." nil
1766 (erc-channel-end-receiving-names))) 1764 (erc-channel-end-receiving-names)))
1767 1765
1768(define-erc-response-handler (367) 1766(define-erc-response-handler (367)
1769 "Channel ban list entries" nil 1767 "Channel ban list entries." nil
1770 (multiple-value-bind (channel banmask setter time) 1768 (multiple-value-bind (channel banmask setter time)
1771 (cdr (erc-response.command-args parsed)) 1769 (cdr (erc-response.command-args parsed))
1772 ;; setter and time are not standard 1770 ;; setter and time are not standard
@@ -1781,7 +1779,7 @@ See `erc-display-server-message'." nil
1781 ?b banmask)))) 1779 ?b banmask))))
1782 1780
1783(define-erc-response-handler (368) 1781(define-erc-response-handler (368)
1784 "End of channel ban list" nil 1782 "End of channel ban list." nil
1785 (let ((channel (second (erc-response.command-args parsed)))) 1783 (let ((channel (second (erc-response.command-args parsed))))
1786 (erc-display-message parsed 'notice 'active 's368 1784 (erc-display-message parsed 'notice 'active 's368
1787 ?c channel))) 1785 ?c channel)))
@@ -1797,7 +1795,7 @@ See `erc-display-server-message'." nil
1797 's379 ?c from ?f to))) 1795 's379 ?c from ?f to)))
1798 1796
1799(define-erc-response-handler (391) 1797(define-erc-response-handler (391)
1800 "Server's time string" nil 1798 "Server's time string." nil
1801 (erc-display-message 1799 (erc-display-message
1802 parsed 'notice 'active 1800 parsed 'notice 'active
1803 's391 ?s (second (erc-response.command-args parsed)) 1801 's391 ?s (second (erc-response.command-args parsed))
@@ -1824,56 +1822,47 @@ See `erc-display-server-message'." nil
1824 1822
1825 1823
1826(define-erc-response-handler (405) 1824(define-erc-response-handler (405)
1827 ;; Can't join that many channels. 1825 "Can't join that many channels." nil
1828 nil nil
1829 (erc-display-message parsed '(notice error) 'active 1826 (erc-display-message parsed '(notice error) 'active
1830 's405 ?c (second (erc-response.command-args parsed)))) 1827 's405 ?c (second (erc-response.command-args parsed))))
1831 1828
1832(define-erc-response-handler (406) 1829(define-erc-response-handler (406)
1833 ;; No such nick 1830 "No such nick." nil
1834 nil nil
1835 (erc-display-message parsed '(notice error) 'active 1831 (erc-display-message parsed '(notice error) 'active
1836 's406 ?n (second (erc-response.command-args parsed)))) 1832 's406 ?n (second (erc-response.command-args parsed))))
1837 1833
1838(define-erc-response-handler (412) 1834(define-erc-response-handler (412)
1839 ;; No text to send 1835 "No text to send." nil
1840 nil nil
1841 (erc-display-message parsed '(notice error) 'active 's412)) 1836 (erc-display-message parsed '(notice error) 'active 's412))
1842 1837
1843(define-erc-response-handler (421) 1838(define-erc-response-handler (421)
1844 ;; Unknown command 1839 "Unknown command." nil
1845 nil nil
1846 (erc-display-message parsed '(notice error) 'active 's421 1840 (erc-display-message parsed '(notice error) 'active 's421
1847 ?c (second (erc-response.command-args parsed)))) 1841 ?c (second (erc-response.command-args parsed))))
1848 1842
1849(define-erc-response-handler (432) 1843(define-erc-response-handler (432)
1850 ;; Bad nick. 1844 "Bad nick." nil
1851 nil nil
1852 (erc-display-message parsed '(notice error) 'active 's432 1845 (erc-display-message parsed '(notice error) 'active 's432
1853 ?n (second (erc-response.command-args parsed)))) 1846 ?n (second (erc-response.command-args parsed))))
1854 1847
1855(define-erc-response-handler (433) 1848(define-erc-response-handler (433)
1856 ;; Login-time "nick in use" 1849 "Login-time \"nick in use\"." nil
1857 nil nil
1858 (erc-nickname-in-use (second (erc-response.command-args parsed)) 1850 (erc-nickname-in-use (second (erc-response.command-args parsed))
1859 "already in use")) 1851 "already in use"))
1860 1852
1861(define-erc-response-handler (437) 1853(define-erc-response-handler (437)
1862 ;; Nick temporarily unavailable (IRCnet) 1854 "Nick temporarily unavailable (on IRCnet)." nil
1863 nil nil
1864 (let ((nick/channel (second (erc-response.command-args parsed)))) 1855 (let ((nick/channel (second (erc-response.command-args parsed))))
1865 (unless (erc-channel-p nick/channel) 1856 (unless (erc-channel-p nick/channel)
1866 (erc-nickname-in-use nick/channel "temporarily unavailable")))) 1857 (erc-nickname-in-use nick/channel "temporarily unavailable"))))
1867 1858
1868(define-erc-response-handler (442) 1859(define-erc-response-handler (442)
1869 ;; Not on channel 1860 "Not on channel." nil
1870 nil nil
1871 (erc-display-message parsed '(notice error) 'active 's442 1861 (erc-display-message parsed '(notice error) 'active 's442
1872 ?c (second (erc-response.command-args parsed)))) 1862 ?c (second (erc-response.command-args parsed))))
1873 1863
1874(define-erc-response-handler (461) 1864(define-erc-response-handler (461)
1875 ;; Not enough params for command. 1865 "Not enough parameters for command." nil
1876 nil nil
1877 (erc-display-message parsed '(notice error) 'active 's461 1866 (erc-display-message parsed '(notice error) 'active 's461
1878 ?c (second (erc-response.command-args parsed)) 1867 ?c (second (erc-response.command-args parsed))
1879 ?m (erc-response.contents parsed))) 1868 ?m (erc-response.contents parsed)))
@@ -1887,7 +1876,7 @@ See `erc-display-server-message'." nil
1887 (erc-response.contents parsed))) 1876 (erc-response.contents parsed)))
1888 1877
1889(define-erc-response-handler (474) 1878(define-erc-response-handler (474)
1890 "Banned from channel errors" nil 1879 "Banned from channel errors." nil
1891 (erc-display-message parsed '(notice error) nil 1880 (erc-display-message parsed '(notice error) nil
1892 (intern (format "s%s" 1881 (intern (format "s%s"
1893 (erc-response.command parsed))) 1882 (erc-response.command parsed)))
@@ -1906,14 +1895,14 @@ See `erc-display-server-message'." nil
1906 (erc-cmd-JOIN channel key))))) 1895 (erc-cmd-JOIN channel key)))))
1907 1896
1908(define-erc-response-handler (477) 1897(define-erc-response-handler (477)
1909 nil nil 1898 "Channel doesn't support modes." nil
1910 (let ((channel (second (erc-response.command-args parsed))) 1899 (let ((channel (second (erc-response.command-args parsed)))
1911 (message (erc-response.contents parsed))) 1900 (message (erc-response.contents parsed)))
1912 (erc-display-message parsed 'notice (erc-get-buffer channel proc) 1901 (erc-display-message parsed 'notice (erc-get-buffer channel proc)
1913 (format "%s: %s" channel message)))) 1902 (format "%s: %s" channel message))))
1914 1903
1915(define-erc-response-handler (482) 1904(define-erc-response-handler (482)
1916 nil nil 1905 "You need to be a channel operator to do that." nil
1917 (let ((channel (second (erc-response.command-args parsed))) 1906 (let ((channel (second (erc-response.command-args parsed)))
1918 (message (erc-response.contents parsed))) 1907 (message (erc-response.contents parsed)))
1919 (erc-display-message parsed '(error notice) 'active 's482 1908 (erc-display-message parsed '(error notice) 'active 's482
@@ -1935,7 +1924,9 @@ See `erc-display-server-message'." nil
1935 ;; 491 - No O-lines for your host 1924 ;; 491 - No O-lines for your host
1936 ;; 501 - Unknown MODE flag 1925 ;; 501 - Unknown MODE flag
1937 ;; 502 - Cannot change mode for other users 1926 ;; 502 - Cannot change mode for other users
1938 nil nil 1927 "Generic display of server error messages.
1928
1929See `erc-display-error-notice'." nil
1939 (erc-display-error-notice 1930 (erc-display-error-notice
1940 parsed 1931 parsed
1941 (intern (format "s%s" (erc-response.command parsed))))) 1932 (intern (format "s%s" (erc-response.command parsed)))))
diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el
index ac57de9cd15..028d358ad39 100644
--- a/lisp/erc/erc-services.el
+++ b/lisp/erc/erc-services.el
@@ -227,6 +227,8 @@ Example of use:
227 "IDENTIFY" nil nil nil) 227 "IDENTIFY" nil nil nil)
228 (freenode 228 (freenode
229 "NickServ!NickServ@services." 229 "NickServ!NickServ@services."
230 ;; freenode also accepts a password at login, see the `erc'
231 ;; :password argument.
230 "/msg\\s-NickServ\\s-IDENTIFY\\s-<password>" 232 "/msg\\s-NickServ\\s-IDENTIFY\\s-<password>"
231 "NickServ" 233 "NickServ"
232 "IDENTIFY" nil nil 234 "IDENTIFY" nil nil
@@ -249,9 +251,11 @@ Example of use:
249 "IDENTIFY" nil "SQUERY" nil) 251 "IDENTIFY" nil "SQUERY" nil)
250 (OFTC 252 (OFTC
251 "NickServ!services@services.oftc.net" 253 "NickServ!services@services.oftc.net"
252 "type\\s-/msg\\s-NickServ\\s-IDENTIFY\\s-password." 254 ;; OFTC's NickServ doesn't ask you to identify anymore.
255 nil
253 "NickServ" 256 "NickServ"
254 "IDENTIFY" nil nil nil) 257 "IDENTIFY" nil nil
258 "You\\s-are\\s-successfully\\s-identified\\s-as\\s-")
255 (QuakeNet 259 (QuakeNet
256 nil nil 260 nil nil
257 "Q@CServe.quakenet.org" 261 "Q@CServe.quakenet.org"
@@ -334,15 +338,15 @@ If this is the case, run `erc-nickserv-identified-hook'."
334 ;; continue only if we're sure it's the real nickserv for this network 338 ;; continue only if we're sure it's the real nickserv for this network
335 ;; and it's told us we've successfully identified 339 ;; and it's told us we've successfully identified
336 (when (and sender (equal sspec sender) 340 (when (and sender (equal sspec sender)
341 success-regex
337 (string-match success-regex msg)) 342 (string-match success-regex msg))
338 (erc-log "NickServ IDENTIFY success notification detected") 343 (erc-log "NickServ IDENTIFY success notification detected")
339 (run-hook-with-args 'erc-nickserv-identified-hook network nick) 344 (run-hook-with-args 'erc-nickserv-identified-hook network nick)
340 nil))) 345 nil)))
341 346
342(defun erc-nickserv-identify-autodetect (proc parsed) 347(defun erc-nickserv-identify-autodetect (proc parsed)
343 "Check for a NickServ identify request everytime a notice is received. 348 "Identify to NickServ when an identify request is received.
344Make sure it is the real NickServ for this network and that it has 349Make sure it is the real NickServ for this network.
345specifically asked the user to IDENTIFY.
346If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the 350If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the
347password for this nickname, otherwise try to send it automatically." 351password for this nickname, otherwise try to send it automatically."
348 (unless (and (null erc-nickserv-passwords) 352 (unless (and (null erc-nickserv-passwords)
@@ -356,6 +360,7 @@ password for this nickname, otherwise try to send it automatically."
356 ;; continue only if we're sure it's the real nickserv for this network 360 ;; continue only if we're sure it's the real nickserv for this network
357 ;; and it's asked us to identify 361 ;; and it's asked us to identify
358 (when (and sender (equal sspec sender) 362 (when (and sender (equal sspec sender)
363 identify-regex
359 (string-match identify-regex msg)) 364 (string-match identify-regex msg))
360 (erc-log "NickServ IDENTIFY request detected") 365 (erc-log "NickServ IDENTIFY request detected")
361 (erc-nickserv-call-identify-function nick) 366 (erc-nickserv-call-identify-function nick)