X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/c4077254f9de69f8204d58cadeecf122eff46ed3..758c81e87ded2bad9f5a5a6683fb498965eb508c:/lisp/erc/erc-backend.el diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 7bc56584ea..cce24e67cf 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -311,7 +311,7 @@ If a key is pressed while ERC is waiting, it will stop waiting." :type 'number) (defcustom erc-split-line-length 440 - "*The maximum length of a single message. + "The maximum length of a single message. If a message exceeds this size, it is broken into multiple ones. IRC allows for lines up to 512 bytes. Two of them are CR LF. @@ -379,27 +379,34 @@ It should take same arguments as `open-network-stream' does." :type 'function) (defcustom erc-server-prevent-duplicates '("301") - "*Either nil or a list of strings. + "Either nil or a list of strings. Each string is a IRC message type, like PRIVMSG or NOTICE. All Message types in that list of subjected to duplicate prevention." :type '(choice (const nil) (list string)) :group 'erc-server) (defcustom erc-server-duplicate-timeout 60 - "*The time allowed in seconds between duplicate messages. + "The time allowed in seconds between duplicate messages. If two identical messages arrive within this value of one another, the second isn't displayed." :type 'integer :group 'erc-server) +(defcustom erc-server-timestamp-format "%Y-%m-%d %T" + "Timestamp format used with server response messages. +This string is processed using `format-time-string'." + :version "24.2" + :type 'string + :group 'erc-server) + ;;; Flood-related ;; Most of this is courtesy of Jorgen Schaefer and Circe ;; (http://www.nongnu.org/circe) (defcustom erc-server-flood-margin 10 - "*A margin on how much excess data we send. + "A margin on how much excess data we send. The flood protection algorithm of ERC works like the one detailed in RFC 2813, section 5.8 \"Flood control of clients\". @@ -423,14 +430,14 @@ protection algorithm." ;; Ping handling (defcustom erc-server-send-ping-interval 30 - "*Interval of sending pings to the server, in seconds. + "Interval of sending pings to the server, in seconds. If this is set to nil, pinging the server is disabled." :group 'erc-server :type '(choice (const :tag "Disabled" nil) (integer :tag "Seconds"))) (defcustom erc-server-send-ping-timeout 120 - "*If the time between ping and response is greater than this, reconnect. + "If the time between ping and response is greater than this, reconnect. The time is in seconds. This must be greater than or equal to the value for @@ -1454,7 +1461,8 @@ add things to `%s' instead." "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)))) + (time (format-time-string erc-server-timestamp-format + (current-time)))) (multiple-value-bind (nick login host) (values-list (erc-parse-user (erc-response.sender parsed))) (erc-update-channel-member ch nick nick nil nil nil host login) @@ -1647,7 +1655,7 @@ See `erc-display-server-message'." nil (multiple-value-bind (nick seconds-idle on-since time) (values-list (cdr (erc-response.command-args parsed))) (setq time (when on-since - (format-time-string "%T %Y/%m/%d" + (format-time-string erc-server-timestamp-format (erc-string-to-emacs-time on-since)))) (erc-update-user-nick nick nick nil nil nil (and time (format "on since %s" time))) @@ -1724,7 +1732,8 @@ See `erc-display-server-message'." nil (third (erc-response.command-args parsed))))) (erc-display-message parsed 'notice (erc-get-buffer channel proc) - 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time)))) + 's329 ?c channel ?t (format-time-string erc-server-timestamp-format + time)))) (define-erc-response-handler (330) "Nick is authed as (on Quakenet network)." nil @@ -1761,7 +1770,7 @@ See `erc-display-server-message'." nil "Who set the topic, and when." nil (multiple-value-bind (channel nick time) (values-list (cdr (erc-response.command-args parsed))) - (setq time (format-time-string "%T %Y/%m/%d" + (setq time (format-time-string erc-server-timestamp-format (erc-string-to-emacs-time time))) (erc-update-channel-topic channel (format "\C-o (%s, %s)" nick time)