(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)))
(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)
?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))))
?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))
(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)
(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)) " ")))
?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
;; 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)
?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))
'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,
?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)))
'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"
(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
?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)))
'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))
(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)))
(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)))
(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
;; 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)))))
"IDENTIFY" nil nil nil)
(freenode
"NickServ!NickServ@services."
+ ;; freenode also accepts a password at login, see the `erc'
+ ;; :password argument.
"/msg\\s-NickServ\\s-\ 2IDENTIFY\ 2\\s-<password>"
"NickServ"
"IDENTIFY" nil nil
"IDENTIFY" nil "SQUERY" nil)
(OFTC
"NickServ!services@services.oftc.net"
- "type\\s-\ 2/msg\\s-NickServ\\s-IDENTIFY\\s-\1fpassword\1f\ 2."
+ ;; 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-\ 2")
(QuakeNet
nil nil
"Q@CServe.quakenet.org"
;; 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)
;; 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)