1Net::Jabber::Protocol(3U)ser Contributed Perl DocumentatiNoent::Jabber::Protocol(3)
2
3
4
6 Net::Jabber::Protocol - Jabber Protocol Library
7
9 Net::Jabber::Protocol is a module that provides a developer easy
10 access to the Jabber Instant Messaging protocol. It provides high
11 level functions to the Net::Jabber Client, Component, and Server
12 objects. These functions are automatically indluded in those modules
13 through AUTOLOAD and delegates.
14
16 Protocol.pm seeks to provide enough high level APIs and automation of
17 the low level APIs that writing a Jabber Client/Transport in Perl is
18 trivial. For those that wish to work with the low level you can do
19 that too, but those functions are covered in the documentation for
20 each module.
21
22 Net::Jabber::Protocol provides functions to login, send and receive
23 messages, set personal information, create a new user account, manage
24 the roster, and disconnect. You can use all or none of the functions,
25 there is no requirement.
26
27 For more information on how the details for how Net::Jabber is written
28 please see the help for Net::Jabber itself.
29
30 For more information on writing a Client see Net::Jabber::Client.
31
32 For more information on writing a Transport see Net::Jabber::Transport.
33
34 Modes
35 Several of the functions take a mode argument that let you specify how
36 the function should behave:
37
38 block - send the packet with an ID, and then block until an answer
39 comes back. You can optionally specify a timeout so that
40 you do not block forever.
41
42 nonblock - send the packet with an ID, but then return that id and
43 control to the master program. Net::Jabber is still
44 tracking this packet, so you must use the CheckID function
45 to tell when it comes in. (This might not be very
46 useful...)
47
48 passthru - send the packet with an ID, but do NOT register it with
49 Net::Jabber, then return the ID. This is useful when
50 combined with the XPath function because you can register
51 a one shot function tied to the id you get back.
52
53 Basic Functions
54 use Net::Jabber qw( Client );
55 $Con = new Net::Jabber::Client(); # From
56 $status = $Con->Connect(hostname=>"jabber.org"); # Net::Jabber::Client
57
58 or
59
60 use Net::Jabber qw( Component );
61 $Con = new Net::Jabber::Component(); #
62 $status = $Con->Connect(hostname=>"jabber.org", # From
63 secret=>"bob"); # Net::Jabber::Component
64
65
66 #
67 # For callback setup, see Net::XMPP::Protocol
68 #
69
70 $Con->Info(name=>"Jarl",
71 version=>"v0.6000");
72
73 ID Functions
74 $id = $Con->SendWithID($sendObj);
75 $id = $Con->SendWithID("<tag>XML</tag>");
76 $receiveObj = $Con->SendAndReceiveWithID($sendObj);
77 $receiveObj = $Con->SendAndReceiveWithID($sendObj,
78 10);
79 $receiveObj = $Con->SendAndReceiveWithID("<tag>XML</tag>");
80 $receiveObj = $Con->SendAndReceiveWithID("<tag>XML</tag>",
81 5);
82 $yesno = $Con->ReceivedID($id);
83 $receiveObj = $Con->GetID($id);
84 $receiveObj = $Con->WaitForID($id);
85 $receiveObj = $Con->WaitForID($id,
86 20);
87
88 IQ Functions
89 Agents Functions
90 %agents = $Con->AgentsGet();
91 %agents = $Con->AgentsGet(to=>"transport.jabber.org");
92
93 Browse Functions
94 %hash = $Con->BrowseRequest(jid=>"jabber.org");
95 %hash = $Con->BrowseRequest(jid=>"jabber.org",
96 timeout=>10);
97
98 $id = $Con->BrowseRequest(jid=>"jabber.org",
99 mode=>"nonblock");
100
101 $id = $Con->BrowseRequest(jid=>"jabber.org",
102 mode=>"passthru");
103
104 Browse DB Functions
105 $Con->BrowseDBDelete("jabber.org");
106 $Con->BrowseDBDelete(Net::Jabber::JID);
107
108 $presence = $Con->BrowseDBQuery(jid=>"bob\@jabber.org");
109 $presence = $Con->BrowseDBQuery(jid=>Net::Jabber::JID);
110 $presence = $Con->BrowseDBQuery(jid=>"users.jabber.org",
111 timeout=>10);
112 $presence = $Con->BrowseDBQuery(jid=>"conference.jabber.org",
113 refresh=>1);
114
115 Bystreams Functions
116 %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server");
117 %hash = $Con->ByteStreamsProxyRequest(jid=>"proxy.server",
118 timeout=>10);
119
120 $id = $Con->ByteStreamsProxyRequest(jid=>"proxy.server",
121 mode=>"nonblock");
122
123 $id = $Con->ByteStreamsProxyRequest(jid=>"proxy.server",
124 mode=>"passthru");
125
126
127 %hash = $Con->ByteStreamsProxyParse($query);
128
129
130 $status = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
131 jid=>"proxy.server");
132 $status = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
133 jid=>"proxy.server",
134 timeout=>10);
135
136 $id = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
137 jid=>"proxy.server",
138 mode=>"nonblock");
139
140 $id = $Con->ByteStreamsProxyActivate(sid=>"stream_id",
141 jid=>"proxy.server",
142 mode=>"passthru");
143
144
145 $jid = $Con->ByteStreamsOffer(sid=>"stream_id",
146 streamhosts=>[{jid=>"jid",
147 host=>"host",
148 port=>"port",
149 zeroconf=>"zero",
150 },
151 ...
152 ],
153 jid=>"bob\@jabber.org");
154 $jid = $Con->ByteStreamsOffer(sid=>"stream_id",
155 streamhosts=>[{},{},...],
156 jid=>"bob\@jabber.org",
157 timeout=>10);
158
159 $id = $Con->ByteStreamsOffer(sid=>"stream_id",
160 streamhosts=>[{},{},...],
161 jid=>"bob\@jabber.org",
162 mode=>"nonblock");
163
164 $id = $Con->ByteStreamsOffer(sid=>"stream_id",
165 streamhosts=>[{},{},...],
166 jid=>"bob\@jabber.org",
167 mode=>"passthru");
168
169 Disco Functions
170 %hash = $Con->DiscoInfoRequest(jid=>"jabber.org");
171 %hash = $Con->DiscoInfoRequest(jid=>"jabber.org",
172 node=>"node...");
173 %hash = $Con->DiscoInfoRequest(jid=>"jabber.org",
174 node=>"node...",
175 timeout=>10);
176
177 $id = $Con->DiscoInfoRequest(jid=>"jabber.org",
178 mode=>"nonblock");
179 $id = $Con->DiscoInfoRequest(jid=>"jabber.org",
180 node=>"node...",
181 mode=>"nonblock");
182
183 $id = $Con->DiscoInfoRequest(jid=>"jabber.org",
184 mode=>"passthru");
185 $id = $Con->DiscoInfoRequest(jid=>"jabber.org",
186 node=>"node...",
187 mode=>"passthru");
188
189
190 %hash = $Con->DiscoInfoParse($query);
191
192
193 %hash = $Con->DiscoItemsRequest(jid=>"jabber.org");
194 %hash = $Con->DiscoItemsRequest(jid=>"jabber.org",
195 timeout=>10);
196
197 $id = $Con->DiscoItemsRequest(jid=>"jabber.org",
198 mode=>"nonblock");
199
200 $id = $Con->DiscoItemsRequest(jid=>"jabber.org",
201 mode=>"passthru");
202
203
204 %hash = $Con->DiscoItemsParse($query);
205
206 Feature Negotiation Functions
207 %hash = $Con->FeatureNegRequest(jid=>"jabber.org",
208 features=>{ feat1=>["opt1","opt2",...],
209 feat2=>["optA","optB",...]
210 }
211 );
212 %hash = $Con->FeatureNegRequest(jid=>"jabber.org",
213 features=>{ ... },
214 timeout=>10);
215
216 $id = $Con->FeatureNegRequest(jid=>"jabber.org",
217 features=>{ ... },
218 mode=>"nonblock");
219
220 $id = $Con->FeatureNegRequest(jid=>"jabber.org",
221 features=>{ ... },
222 mode=>"passthru");
223
224 my $query = $self->FeatureNegQuery(\{ ... });
225 $iq->AddQuery($query);
226
227 %hash = $Con->FeatureNegParse($query);
228
229 File Transfer Functions
230 $method = $Con->FileTransferOffer(jid=>"bob\@jabber.org",
231 sid=>"stream_id",
232 filename=>"/path/to/file",
233 methods=>["http://jabber.org/protocol/si/profile/bytestreams",
234 "jabber:iq:oob",
235 ...
236 ]
237 );
238 $method = $Con->FileTransferOffer(jid=>"bob\@jabber.org",
239 sid=>"stream_id",
240 filename=>"/path/to/file",
241 methods=>\@methods,
242 timeout=>"10");
243
244 $id = $Con->FileTransferOffer(jid=>"bob\@jabber.org",
245 sid=>"stream_id",
246 filename=>"/path/to/file",
247 methods=>\@methods,
248 mode=>"nonblock");
249
250 $id = $Con->FileTransferOffer(jid=>"bob\@jabber.org",
251 sid=>"stream_id",
252 filename=>"/path/to/file",
253 methods=>\@methods,
254 mode=>"passthru");
255
256 Last Functions
257 $Con->LastQuery();
258 $Con->LastQuery(to=>"bob@jabber.org");
259
260 %result = $Con->LastQuery(mode=>"block");
261 %result = $Con->LastQuery(to=>"bob@jabber.org",
262 mode=>"block");
263
264 %result = $Con->LastQuery(to=>"bob@jabber.org",
265 mode=>"block",
266 timeout=>10);
267 %result = $Con->LastQuery(mode=>"block",
268 timeout=>10);
269
270 $Con->LastSend(to=>"bob@jabber.org");
271
272 $seconds = $Con->LastActivity();
273
274 Multi-User Chat Functions
275 $Con->MUCJoin(room=>"jabber",
276 server=>"conference.jabber.org",
277 nick=>"nick");
278
279 $Con->MUCJoin(room=>"jabber",
280 server=>"conference.jabber.org",
281 nick=>"nick",
282 password=>"secret");
283
284 Register Functions
285 @result = $Con->RegisterSendData("users.jabber.org",
286 first=>"Bob",
287 last=>"Smith",
288 nick=>"bob",
289 email=>"foo@bar.net");
290
291 RPC Functions
292 $query = $Con->RPCEncode(type=>"methodCall",
293 methodName=>"methodName",
294 params=>[param,param,...]);
295 $query = $Con->RPCEncode(type=>"methodResponse",
296 params=>[param,param,...]);
297 $query = $Con->RPCEncode(type=>"methodResponse",
298 faultCode=>4,
299 faultString=>"Too many params");
300
301 @response = $Con->RPCParse($iq);
302
303 @response = $Con->RPCCall(to=>"dataHouse.jabber.org",
304 methodname=>"numUsers",
305 params=>[ param,param,... ]
306 );
307
308 $Con->RPCResponse(to=>"you\@jabber.org",
309 params=>[ param,param,... ]);
310
311 $Con->RPCResponse(to=>"you\@jabber.org",
312 faultCode=>"4",
313 faultString=>"Too many parameters"
314 );
315
316 $Con->RPCSetCallBacks(myMethodA=>\&methoda,
317 myMethodB=>\&do_somthing,
318 etc...
319 );
320
321 Search Functions
322 %fields = $Con->SearchRequest();
323 %fields = $Con->SearchRequest(to=>"users.jabber.org");
324 %fields = $Con->SearchRequest(to=>"users.jabber.org",
325 timeout=>10);
326
327 $Con->SearchSend(to=>"somewhere",
328 name=>"",
329 first=>"Bob",
330 last=>"",
331 nick=>"bob",
332 email=>"",
333 key=>"some key");
334
335 $Con->SearchSendData("users.jabber.org",
336 first=>"Bob",
337 last=>"",
338 nick=>"bob",
339 email=>"");
340
341 Time Functions
342 $Con->TimeQuery();
343 $Con->TimeQuery(to=>"bob@jabber.org");
344
345 %result = $Con->TimeQuery(mode=>"block");
346 %result = $Con->TimeQuery(to=>"bob@jabber.org",
347 mode=>"block");
348
349 $Con->TimeSend(to=>"bob@jabber.org");
350
351 Version Functions
352 $Con->VersionQuery();
353 $Con->VersionQuery(to=>"bob@jabber.org");
354
355 %result = $Con->VersionQuery(mode=>"block");
356 %result = $Con->VersionQuery(to=>"bob@jabber.org",
357 mode=>"block");
358
359 $Con->VersionSend(to=>"bob@jabber.org",
360 name=>"Net::Jabber",
361 ver=>"1.0a",
362 os=>"Perl");
363
365 Basic Functions
366 Info(name=>string, - Set some information so that Net::Jabber
367 version=>string) can auto-reply to some packets for you to
368 reduce the work you have to do.
369
370 NOTE: This requires that you use the
371 SetIQCallBacks methodology and not the
372 SetCallBacks for <iq/> packets.
373
374 IQ Functions
375 Agents Functions
376 ********************************
377 * *
378 * Deprecated in favor of Disco *
379 * *
380 ********************************
381
382 AgentsGet(to=>string, - takes all of the information and
383 AgentsGet() builds a Net::Jabber::IQ::Agents packet.
384 It then sends that packet either to the
385 server, or to the specified transport,
386 with an ID and waits for that ID to return.
387 Then it looks in the resulting packet and
388 builds a hash that contains the values
389 of the agent list. The hash is layed out
390 like this: (NOTE: the jid is the key to
391 distinguish the various agents)
392
393 $hash{<JID>}->{order} = 4
394 ->{name} = "ICQ Transport"
395 ->{transport} = "ICQ #"
396 ->{description} = "ICQ..blah.."
397 ->{service} = "icq"
398 ->{register} = 1
399 ->{search} = 1
400 etc...
401
402 The order field determines the order that
403 it came from the server in... in case you
404 care. For more info on the valid fields
405 see the Net::Jabber::Query jabber:iq:agent
406 namespace.
407
408 Browse Functions
409 ********************************
410 * *
411 * Deprecated in favor of Disco *
412 * *
413 ********************************
414
415 BrowseRequest(jid=>string, - sends a jabber:iq:browse request to
416 mode=>string, the jid passed as an argument.
417 timeout=>int) Returns a hash with the resulting
418 tree if mode is set to "block":
419
420 $browse{'category'} = "conference"
421 $browse{'children'}->[0]
422 $browse{'children'}->[1]
423 $browse{'children'}->[11]
424 $browse{'jid'} = "conference.jabber.org"
425 $browse{'name'} = "Jabber.org Conferencing Center"
426 $browse{'ns'}->[0]
427 $browse{'ns'}->[1]
428 $browse{'type'} = "public"
429
430 The ns array is an array of the
431 namespaces that this jid supports.
432 The children array points to hashs
433 of this form, and represent the fact
434 that they can be browsed to.
435
436 See MODES above for using the mode
437 and timeout.
438
439 Browse DB Functions
440 BrowseDBDelete(string|Net::Jabber::JID) - delete thes JID browse
441 data from the DB.
442
443 BrowseDBQuery(jid=>string | NJ::JID, - returns the browse data
444 timeout=>integer, for the requested JID. If
445 refresh=>0|1) the DB does not contain
446 the data for the JID, then
447 it attempts to fetch the
448 data via BrowseRequest().
449 The timeout is passed to
450 the BrowseRequest() call,
451 and refresh tells the DB
452 to request the data, even
453 if it already has some.
454
455 Bytestreams Functions
456 ByteStreamsProxyRequest(jid=>string, - sends a bytestreams request
457 mode=>string, to the jid passed as an
458 timeout=>int) argument. Returns an array
459 ref with the resulting tree
460 if mode is set to "block".
461
462 See ByteStreamsProxyParse
463 for the format of the
464 resulting tree.
465
466 See MODES above for using
467 the mode and timeout.
468
469 ByteStreamsProxyParse(Net::Jabber::Query) - parses the query and
470 returns an array ref
471 to the resulting tree:
472
473 $host[0]->{jid} = "bytestreams1.proxy.server";
474 $host[0]->{host} = "proxy1.server";
475 $host[0]->{port} = "5006";
476 $host[1]->{jid} = "bytestreams2.proxy.server";
477 $host[1]->{host} = "proxy2.server";
478 $host[1]->{port} = "5007";
479 ...
480
481 ByteStreamsProxyActivate(jid=>string, - sends a bytestreams activate
482 sid=>string, to the jid passed as an
483 mode=>string, argument. Returns 1 if the
484 timeout=>int) proxy activated (undef if
485 it did not) if mode is set
486 to "block".
487
488 sid is the stream id that
489 is being used to talk about
490 this stream.
491
492 See MODES above for using
493 the mode and timeout.
494
495 ByteStreamsOffer(jid=>string, - sends a bytestreams offer
496 sid=>string, to the jid passed as an
497 streamhosts=>arrayref argument. Returns the jid
498 mode=>string, of the streamhost that the
499 timeout=>int) user selected if mode is set
500 to "block".
501
502 streamhosts is the same
503 format as the array ref
504 returned from
505 ByteStreamsProxyParse.
506
507 See MODES above for using
508 the mode and timeout.
509
510 Disco Functions
511 DiscoInfoRequest(jid=>string, - sends a disco#info request to
512 node=>string, the jid passed as an argument,
513 mode=>string, and the node if specified.
514 timeout=>int) Returns a hash with the resulting
515 tree if mode is set to "block".
516
517 See DiscoInfoParse for the format
518 of the resulting tree.
519
520 See MODES above for using the mode
521 and timeout.
522
523 DiscoInfoParse(Net::Jabber::Query) - parses the query and
524 returns a hash ref
525 to the resulting tree:
526
527 $info{identity}->[0]->{category} = "groupchat";
528 $info{identity}->[0]->{name} = "Public Chatrooms";
529 $info{identity}->[0]->{type} = "public";
530
531 $info{identity}->[1]->{category} = "groupchat";
532 $info{identity}->[1]->{name} = "Private Chatrooms";
533 $info{identity}->[1]->{type} = "private";
534
535 $info{feature}->{http://jabber.org/protocol/disco#info} = 1;
536 $info{feature}->{http://jabber.org/protocol/muc#admin} = 1;
537
538 DiscoItemsRequest(jid=>string, - sends a disco#items request to
539 mode=>string, the jid passed as an argument.
540 timeout=>int) Returns a hash with the resulting
541 tree if mode is set to "block".
542
543 See DiscoItemsParse for the format
544 of the resulting tree.
545
546 See MODES above for using the mode
547 and timeout.
548
549 DiscoItemsParse(Net::Jabber::Query) - parses the query and
550 returns a hash ref
551 to the resulting tree:
552
553 $items{jid}->{node} = name;
554
555 $items{"proxy.server"}->{""} = "Bytestream Proxy Server";
556 $items{"conf.server"}->{"public"} = "Public Chatrooms";
557 $items{"conf.server"}->{"private"} = "Private Chatrooms";
558
559 Feature Negotiation Functions
560 FeatureNegRequest(jid=>string, - sends a feature negotiation to
561 features=>hash ref, the jid passed as an argument,
562 mode=>string, using the features specified.
563 timeout=>int) Returns a hash with the resulting
564 tree if mode is set to "block".
565
566 See DiscoInfoQuery for the format
567 of the features hash ref.
568
569 See DiscoInfoParse for the format
570 of the resulting tree.
571
572 See MODES above for using the mode
573 and timeout.
574
575 FeatureNegParse(Net::Jabber::Query) - parses the query and
576 returns a hash ref
577 to the resulting tree:
578
579 $features->{feat1} = ["opt1","opt2",...];
580 $features->{feat2} = ["optA","optB",...];
581 ....
582
583 If this is a result:
584
585 $features->{feat1} = "opt2";
586 $features->{feat2} = "optA";
587 ....
588
589 FeatureNeqQuery(hash ref) - takes a hash ref and turns it into a
590 feature negotiation query that you can
591 AddQuery into your packaet. The format
592 of the hash ref is as follows:
593
594 $features->{feat1} = ["opt1","opt2",...];
595 $features->{feat2} = ["optA","optB",...];
596 ....
597
598 File Transfer Functions
599 FileTransferOffer(jid=>string, - sends a file transfer stream
600 sid=>string, initiation to the jid passed
601 filename=>string, as an argument. Returns the
602 mode=>string, method (if the users accepts),
603 timeout=>int) undef (if the user declines),
604 if the mode is set to "block".
605
606 See MODES above for using
607 the mode and timeout.
608
609 Last Functions
610 LastQuery(to=>string, - asks the jid specified for its last
611 mode=>string, activity. If the to is blank, then it
612 timeout=>int) queries the server. Returns a hash with
613 LastQuery() the various items set if mode is set to
614 "block":
615
616 $last{seconds} - Seconds since activity
617 $last{message} - Message for activity
618
619 See MODES above for using the mode
620 and timeout.
621
622 LastSend(to=>string, - sends the specified last to the specified jid.
623 hash) the hash is the seconds and message as shown
624 in the Net::Jabber::Query man page.
625
626 LastActivity() - returns the number of seconds since the last activity
627 by the user.
628
629 Multi-User Chat Functions
630 MUCJoin(room=>string, - Sends the appropriate MUC protocol to join
631 server=>string, the specified room with the specified nick.
632 nick=>string,
633 password=>string)
634
635 Register Functions
636 RegisterSendData(string|JID, - takes the contents of the hash and
637 hash) builds a jabebr:x:data return packet
638 which it sends in a Net::Jabber::Query
639 jabber:iq:register namespace packet.
640 The first argument is the JID to send
641 the packet to. This function returns
642 an array that looks like this:
643
644 [ type , message ]
645
646 If type is "ok" then registration was
647 successful, otherwise message contains
648 a little more detail about the error.
649
650 RPC Functions
651 RPCParse(IQ object) - returns an array. The first argument tells
652 the status "ok" or "fault". The second
653 argument is an array if "ok", or a hash if
654 "fault".
655
656 RPCCall(to=>jid|string, - takes the methodName and params,
657 methodName=>string, builds the RPC calls and sends it
658 params=>array, to the specified address. Returns
659 mode=>string, the above data from RPCParse.
660 timeout=>int)
661 See MODES above for using the mode
662 and timeout.
663
664 RPCResponse(to=>jid|string, - generates a response back to
665 params=>array, the caller. If any part of
666 faultCode=>int, fault is specified, then it
667 faultString=>string) wins.
668
669
670 Note: To ensure that you get the correct type for a param sent
671 back, you can specify the type by prepending the type to
672 the value:
673
674 "i4:5" or "int:5"
675 "boolean:0"
676 "string:56"
677 "double:5.0"
678 "datetime:20020415T11:11:11"
679 "base64:...."
680
681 RPCSetCallBacks(method=>function, - sets the callback functions
682 method=>function, for the specified methods.
683 etc...) The method comes from the
684 <methodName/> and is case
685 sensitive. The single
686 arguemnt is a ref to an
687 array that contains the
688 <params/>. The function you
689 write should return one of two
690 things:
691
692 ["ok", [...] ]
693
694 The [...] is a list of the
695 <params/> you want to return.
696
697 ["fault", {faultCode=>1,
698 faultString=>...} ]
699
700 If you set the function to undef,
701 then the method is removed from
702 the list.
703
704 Search Functions
705 SearchRequest(to=>string, - send an <iq/> request to the specified
706 mode=>string, server/transport, if not specified it
707 timeout=>int) sends to the current active server.
708 SearchRequest() The function returns a hash that
709 contains the required fields. Here
710 is an example of the hash:
711
712 $hash{fields} - The raw fields from
713 the iq:register. To
714 be used if there is
715 no x:data in the
716 packet.
717 $hash{instructions} - How to fill out
718 the form.
719 $hash{form} - The new dynamic forms.
720
721 In $hash{form}, the fields that are
722 present are the required fields the
723 server needs.
724
725 See MODES above for using the mode
726 and timeout.
727
728 SearchSend(to=>string|JID, - takes the contents of the hash and
729 hash) passes it to the SetSearch function
730 in the Net::Jabber::Query
731 jabber:iq:search namespace. And then
732 sends the packet.
733
734 SearchSendData(string|JID, - takes the contents of the hash and
735 hash) builds a jabebr:x:data return packet
736 which it sends in a Net::Jabber::Query
737 jabber:iq:search namespace packet.
738 The first argument is the JID to send
739 the packet to.
740
741 Time Functions
742 TimeQuery(to=>string, - asks the jid specified for its localtime.
743 mode=>string, If the to is blank, then it queries the
744 timeout=>int) server. Returns a hash with the various
745 TimeQuery() items set if mode is set to "block":
746
747 $time{utc} - Time in UTC
748 $time{tz} - Timezone
749 $time{display} - Display string
750
751 See MODES above for using the mode
752 and timeout.
753
754 TimeSend(to=>string) - sends the current UTC time to the specified
755 jid.
756
757 Version Functions
758 VersionQuery(to=>string, - asks the jid specified for its
759 mode=>string, client version information. If the
760 timeout=>int) to is blank, then it queries the
761 VersionQuery() server. Returns ahash with the
762 various items set if mode is set to
763 "block":
764
765 $version{name} - Name
766 $version{ver} - Version
767 $version{os} - Operating System/
768 Platform
769
770 See MODES above for using the mode
771 and timeout.
772
773 VersionSend(to=>string, - sends the specified version information
774 name=>string, to the jid specified in the to.
775 ver=>string,
776 os=>string)
777
779 Ryan Eatmon
780
782 This module is free software; you can redistribute it and/or modify it
783 under the same terms as Perl itself.
784
785
786
787perl v5.28.0 2004-08-17 Net::Jabber::Protocol(3)