• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/erc/

Lines Matching +defs:parse +defs:time +defs:string

39 ;; Upon receiving a line from the server, `erc-parse-server-response'
112 (unparsed "" :type string)
113 (sender "" :type string)
114 (command "" :type string)
116 (contents "" :type string))
222 (defvar erc-server-last-sent-time nil
225 (make-variable-buffer-local 'erc-server-last-sent-time)
227 (defvar erc-server-last-ping-time nil
230 (make-variable-buffer-local 'erc-server-last-ping-time)
232 (defvar erc-server-last-received-time nil
235 (make-variable-buffer-local 'erc-server-last-received-time)
238 "Calculated server lag time in seconds.
304 "The amount of time, in seconds, that ERC will wait between
361 :type '(repeat (cons (string :tag "Target")
372 Each string is a IRC message type, like PRIVMSG or NOTICE.
374 :type '(choice (const nil) (list string))
378 "*The time allowed in seconds between duplicate messages.
396 time, set it equal.
399 time, send a message, and increase
422 "*If the time between ping and response is greater than this, reconnect.
423 The time is in seconds.
453 (split-string (buffer-string) "\n"))))
462 (buffer-string)))
471 (erc-time-diff (erc-current-time)
472 erc-server-last-received-time)
478 (erc-server-send (format "PING %.0f" (erc-current-time)))))
524 (let ((time (erc-current-time)))
525 (setq erc-server-last-sent-time time)
526 (setq erc-server-last-ping-time time)
527 (setq erc-server-last-received-time time))
560 (setq erc-server-last-sent-time 0)
565 (defun erc-server-filter-function (process string)
568 (setq erc-server-last-received-time (erc-current-time))
574 (concat erc-server-filter-data string)
575 string))
580 string)
581 string))
583 (string-match "[\n\r]+" erc-server-filter-data))
592 (erc-parse-server-response process line)))))))
608 (not (string-match "^deleted" event)))
610 (not (string-match "^failed with code 111" event)))))
652 (if (string-match "^open" event)
689 (when (string-match (car pat) target)
695 (defun erc-decode-string-from-target (str target)
704 (erc-decode-coding-string str coding)))
716 (defun erc-server-send (string &optional forcep target)
718 If FORCEP is non-nil, no flood protection is done - the string is
728 (erc-log (concat "erc-server-send: " string "(" (buffer-name) ")"))
729 (setq erc-server-last-sent-time (erc-current-time))
735 (let ((str (concat string "\r\n")))
744 ;; Set encoding just before sending the string
748 (process-send-string erc-server-process str))
766 (let ((now (erc-current-time)))
787 ;; Set encoding just before sending the string
792 (process-send-string erc-server-process msg))
799 (run-at-time (+ 0.2 erc-server-flood-penalty)
809 ((string-match "^\\s-*\\(\\S-+\\) ?\\(.*\\)" line)
810 (let ((tgt (match-string 1 line))
811 (s (match-string 2 line)))
814 ((string= tgt ",")
818 ((string= tgt ".")
864 (defun erc-parse-server-response (proc string)
868 (unless (string= string "") ;; Ignore empty strings
870 (let ((posn (if (eq (aref string 0) ?:)
871 (string-match " " string)
873 (msg (make-erc-response :unparsed string)))
878 (substring string 1 posn)))
881 (let* ((bposn (string-match "[^ \n]" string posn))
882 (eposn (string-match " " string bposn)))
884 (string-match "[^ \n]" string eposn)))
885 (substring string bposn eposn)))
888 (not (eq (aref string posn) ?:)))
890 (eposn (string-match " " string bposn)))
892 (string-match "[^ \n]" string eposn)))
893 (substring string bposn eposn))
896 (let ((str (substring string (1+ posn))))
920 (when (string-match "^[#&].*" arg)
923 (setq decode-target (erc-decode-string-from-target decode-target nil)))
925 (erc-decode-string-from-target
929 (erc-decode-string-from-target
933 (erc-decode-string-from-target
937 (push (erc-decode-string-from-target arg decode-target)
941 (erc-decode-string-from-target
954 (- (erc-current-time) erc-server-duplicate-timeout))
956 (puthash m (erc-current-time) erc-server-duplicates))
975 (run-hook-with-args 'erc-timer-hook (erc-current-time)))))
1142 (erc-parse-user (erc-response.sender parsed))
1144 (when (string= target (erc-current-nick))
1156 (erc-parse-user (erc-response.sender parsed))
1158 (if (string-match "^\\(.*\\)?\^g.*$" chnl)
1159 (setq chnl (match-string 1 chnl)))
1194 (reason (erc-trim-string (erc-response.contents parsed)))
1197 (erc-parse-user (erc-response.sender parsed))
1200 ((string= tgt (erc-current-nick))
1210 ((string= nick (erc-current-nick))
1224 (erc-parse-user (erc-response.sender parsed))
1229 ((string= tgt (erc-current-nick)) nil)
1235 (if (or (string= login "") (string= host ""))
1249 (erc-parse-user (erc-response.sender parsed))
1266 ((string= nick (erc-current-nick))
1284 (reason (erc-trim-string (erc-response.contents parsed)))
1287 (erc-parse-user (erc-response.sender parsed))
1292 (when (string= nick (erc-current-nick))
1311 'PING ?s (erc-time-diff erc-server-last-ping-time (erc-current-time))))
1312 (setq erc-server-last-ping-time (erc-current-time))))
1316 (let ((time (string-to-number (erc-response.contents parsed))))
1317 (when (> time 0)
1318 (setq erc-server-lag (erc-time-diff time (erc-current-time)))
1336 (let* ((sndr (erc-parse-user sender-spec))
1340 (msgp (string= cmd "PRIVMSG"))
1341 (noticep (string= cmd "NOTICE"))
1363 (match-string 1 msg)))))
1383 (when (string= cmd "PRIVMSG")
1395 (erc-parse-user (erc-response.sender parsed))
1406 (topic (erc-trim-string (erc-response.contents parsed)))
1407 (time (format-time-string "%T %m/%d/%y" (current-time))))
1409 (erc-parse-user (erc-response.sender parsed))
1411 (erc-update-channel-topic ch (format "%s\C-o (%s, %s)" topic nick time))
1420 (erc-parse-user (erc-response.sender parsed))
1478 (when (string-match "^\\([A-Z]+\\)\=\\(.*\\)$\\|^\\([A-Z]+\\)$"
1481 `(,(or (match-string 1 section)
1482 (match-string 3 section))
1484 ,(match-string 2 section))))))
1577 (multiple-value-bind (nick seconds-idle on-since time)
1579 (setq time (when on-since
1580 (format-time-string "%T %Y/%m/%d"
1581 (erc-string-to-emacs-time on-since))))
1583 (and time (format "on since %s" time)))
1584 (if time
1587 ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle)) ?t time)
1590 ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle))))))
1634 (time (erc-string-to-emacs-time
1638 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time))))
1675 (multiple-value-bind (channel nick time)
1677 (setq time (format-time-string "%T %Y/%m/%d"
1678 (erc-string-to-emacs-time time)))
1680 (format "\C-o (%s, %s)" nick time)
1683 's333 ?c channel ?n nick ?t time)))
1699 (when (string-match "\\(^[0-9]+ \\)\\(.*\\)$" full-name)
1700 (setq hopcount (match-string 1 full-name))
1701 (setq full-name (match-string 2 full-name)))
1725 (multiple-value-bind (channel banmask setter time)
1727 ;; setter and time are not standard
1733 ?t (or time ""))
1755 "Server's time string" nil
1811 ;; Login-time "nick in use"