]>
Commit | Line | Data |
---|---|---|
1 | ;ELC\1c\0\0\0 | |
2 | ;;; Compiled | |
3 | ;;; in Emacs version 28.2 | |
4 | ;;; with all optimizations. | |
5 | ||
6 | ||
7 | ||
8 | (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310B\"\207" [require jabber-iq jabber-util jabber-autoaway time-date add-to-list jabber-jid-info-menu "Request time" jabber-get-time] 4) | |
9 | #@57 Request time. | |
10 | ||
11 | JC is the Jabber connection. | |
12 | ||
13 | (fn JC TO)\1f | |
14 | (defalias 'jabber-get-time #[514 "\300\ 2\ 2\301\302\303\304\303\305&\b\207" [jabber-send-iq "get" (time ((xmlns . "urn:xmpp:time"))) jabber-silent-process-data jabber-process-time #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\302\ 3\ 2\"\207" [from xml-get-attribute-or-nil jabber-get-legacy-time] 7 "\n\n(fn JC XML-DATA)"]] 11 (#$ . 298) (byte-code "\300 \301\302\303\211\211\304\305&\ 6D\207" [jabber-read-account jabber-read-jid-completing "Request time of: " nil full t] 8)]) | |
15 | #@157 Request legacy time. | |
16 | ||
17 | JC is the Jabber connection. | |
18 | XML-DATA is the parsed tree data from the stream (stanzas) | |
19 | obtained from `xml-parse-region'. | |
20 | ||
21 | (fn JC TO)\1f | |
22 | (defalias 'jabber-get-legacy-time #[514 "\300\ 2\ 2\301\302\303\304\303\305&\b\207" [jabber-send-iq "get" (query ((xmlns . "jabber:iq:time"))) jabber-silent-process-data jabber-process-legacy-time "Time request failed"] 11 (#$ . 825) (byte-code "\300 \301\302\303\211\211\304\305&\ 6D\207" [jabber-read-account jabber-read-jid-completing "Request time of: " nil full t] 8)]) | |
23 | #@186 Handle results from urn:xmpp:time requests. | |
24 | ||
25 | JC is the Jabber Connection. | |
26 | XML-DATA is the parsed tree data from the stream (stanzas) | |
27 | obtained from `xml-parse-region'. | |
28 | ||
29 | (fn JC XML-DATA)\1f | |
30 | (defalias 'jabber-process-time #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\302\ 2\303\"@\206\1a\0\302\ 2\304\"@\302\ 1\305\"@\211AA\211\306\232?\205*\0\211\266\202@\302\ 2\307\"@\211AA\211\306\232?\205=\0\211\266\202@\211\205T\0\ 1\205T\0\310\311\ 5\312\313\314\ 6\ 6!\"\ 5$\207" [from xml-get-attribute-or-nil jabber-xml-get-children time query tzo (("")) utc format "%s has time: %s %s" format-time-string "%Y-%m-%d %T" jabber-parse-time] 13 (#$ . 1356)]) | |
31 | #@187 Handle results from jabber:iq:time requests. | |
32 | ||
33 | JC is the Jabber connection. | |
34 | XML-DATA is the parsed tree data from the stream (stanzas) | |
35 | obtained from `xml-parse-region'. | |
36 | ||
37 | (fn JC XML-DATA)\1f | |
38 | (defalias 'jabber-process-legacy-time #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\302\ 2!\303\ 1\304\"@\211AA\211\305\232?\205 \0\211\266\202@\303\ 2\306\"@\211AA\211\305\232?\2053\0\211\266\202@\303\ 3\307\"@\211AA\211\305\232?\205F\0\211\266\202@\310\311\ 6\ 6\ 5\203U\0\ 5\202h\0\ 4\205h\0\312\313\314\ 6\a!\"\ 4\205g\0\315\ 5PP#\207" [from xml-get-attribute-or-nil jabber-iq-query jabber-xml-get-children display (("")) utc tz format "%s has time: %s" format-time-string "%Y-%m-%d %T" jabber-parse-legacy-time " "] 14 (#$ . 1977)]) | |
39 | #@112 Request time since a user was last online, or uptime of a component. | |
40 | ||
41 | JC is the Jabber connection. | |
42 | ||
43 | (fn JC TO)\1f | |
44 | (defalias 'jabber-get-last-online #[514 "\300\ 2\ 2\301\302\303\304\303\305&\b\207" [jabber-send-iq "get" (query ((xmlns . "jabber:iq:last"))) jabber-silent-process-data jabber-process-last "Last online request failed"] 11 (#$ . 2670) (byte-code "\300 \301\302\303\211\211\304%D\207" [jabber-read-account jabber-read-jid-completing "Get last online for: " nil bare-or-muc] 7)]) | |
45 | #@70 Request idle time of user. | |
46 | ||
47 | JC is the Jabber connection. | |
48 | ||
49 | (fn JC TO)\1f | |
50 | (defalias 'jabber-get-idle-time #[514 "\300\ 2\ 2\301\302\303\304\303\305&\b\207" [jabber-send-iq "get" (query ((xmlns . "jabber:iq:last"))) jabber-silent-process-data jabber-process-last "Idle time request failed"] 11 (#$ . 3160) (byte-code "\300 \301\302\303\211\211\304\305&\ 6D\207" [jabber-read-account jabber-read-jid-completing "Get idle time for: " nil full t] 8)]) | |
51 | #@187 Handle results from jabber:iq:last requests. | |
52 | ||
53 | JC is the Jabber connection. | |
54 | XML-DATA is the parsed tree data from the stream (stanzas) | |
55 | obtained from `xml-parse-region'. | |
56 | ||
57 | (fn JC XML-DATA)\1f | |
58 | (defalias 'jabber-process-last #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\302\ 2!\211\303\ 1:\205\e\0\301\ 2\ 2\"\266\202\ 1\211AA\211\304\232?\205)\0\211\266\202@\210\305\306\ 4!\203:\0\307\310\ 5\ 4#\207\311\ 4!\203i\0\307\312\ 5\ 4#\3131P\0\314\ 3!0\202R\0\210\305\211\247\205e\0\315\316\317\320\321 \322\ 6\ 6!\"\"\323Q\262\ 1P\207\307\324\ 5\ 4#\207" [from xml-get-attribute-or-nil jabber-iq-query seconds (("")) nil jabber-jid-resource format "%s idle for %s seconds" jabber-jid-username "%s last online %s seconds ago" (error) string-to-number " - that is, at " format-time-string "%Y-%m-%d %T" time-subtract current-time seconds-to-time "\n" "%s uptime: %s seconds"] 15 (#$ . 3603)]) | |
59 | (byte-code "\300\301\302\303B\"\210\304\302!\207" [add-to-list jabber-iq-get-xmlns-alist "jabber:iq:time" jabber-return-legacy-time jabber-disco-advertise-feature] 4) | |
60 | #@259 Return client time as defined in XEP-0090. | |
61 | Sender and ID are determined from the incoming packet passed in XML-DATA. | |
62 | ||
63 | JC is the Jabber connection. | |
64 | XML-DATA is the parsed tree data from the stream (stanzas) | |
65 | obtained from `xml-parse-region'. | |
66 | ||
67 | (fn JC XML-DATA)\1f | |
68 | (defalias 'jabber-return-legacy-time #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\ 1\302\ 1:\205\18\0\301\ 2\ 2\"\266\202\303\ 4\ 3\304\305\306\307\310\311\312!E\313\310\311\314!E\315\310\316\310!E\257\ 5\310\211\211\211\ 6 & \207" [from xml-get-attribute-or-nil id jabber-send-iq "result" query ((xmlns . "jabber:iq:time")) display nil format-time-string "%a %b %d %H:%M:%S %Z %Y" tz "%Z" utc jabber-encode-legacy-time] 16 (#$ . 4610)]) | |
69 | (byte-code "\300\301\302\303B\"\210\304\302!\207" [add-to-list jabber-iq-get-xmlns-alist "urn:xmpp:time" jabber-return-time jabber-disco-advertise-feature] 4) | |
70 | #@259 Return client time as defined in XEP-0202. | |
71 | Sender and ID are determined from the incoming packet passed in XML-DATA. | |
72 | ||
73 | JC is the Jabber connection. | |
74 | XML-DATA is the parsed tree data from the stream (stanzas) | |
75 | obtained from `xml-parse-region'. | |
76 | ||
77 | (fn JC XML-DATA)\1f | |
78 | (defalias 'jabber-return-time #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\ 1\302\ 1:\205\18\0\301\ 2\ 2\"\266\202\303\ 4\ 3\304\305\306\307\310\311\310!E\312\310\313 EF\310\211\211\211\ 6 & \207" [from xml-get-attribute-or-nil id jabber-send-iq "result" time ((xmlns . "urn:xmpp:time")) utc nil jabber-encode-time tzo jabber-encode-timezone] 14 (#$ . 5448)]) | |
79 | (byte-code "\300\301\302\303B\"\210\304\302!\207" [add-to-list jabber-iq-get-xmlns-alist "jabber:iq:last" jabber-return-last jabber-disco-advertise-feature] 4) | |
80 | #@20 | |
81 | ||
82 | (fn JC XML-DATA)\1f | |
83 | (defalias 'jabber-return-last #[514 "\211\300\ 1:\205\v\0\301\ 2\ 2\"\266\202\ 1\302\ 1:\205\18\0\301\ 2\ 2\"\266\202\303\ 4\ 3\304\305\306\307\310\311\312 !!BDD\313\211\211\211\ 6 & \207" [from xml-get-attribute-or-nil id jabber-send-iq "result" time (xmlns . "jabber:iq:last") seconds number-to-string floor jabber-autoaway-get-idle-time nil] 14 (#$ . 6210)]) | |
84 | (provide 'jabber-time) |