Codebase list sendxmpp / bff0bf1
Import Debian changes 1.20-1 sendxmpp (1.20-1) unstable; urgency=low * New upstream release. * Convert source package to 3.0 (quilt) format. * Bump Standars-Version. Guus Sliepen authored 14 years ago Thadeu Lima de Souza Cascardo committed 6 years ago
4 changed file(s) with 32 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
0 sendxmpp (1.20-1) unstable; urgency=low
1
2 * New upstream release.
3 * Convert source package to 3.0 (quilt) format.
4 * Bump Standars-Version.
5
6 -- Guus Sliepen <guus@debian.org> Sun, 24 Jan 2010 12:11:38 +0100
7
08 sendxmpp (1.18-1) unstable; urgency=low
19
210 * New upstream release.
22 Priority: optional
33 Maintainer: Guus Sliepen <guus@debian.org>
44 Build-Depends: debhelper (>= 7.0.0), perl
5 Standards-Version: 3.8.1
5 Standards-Version: 3.8.3
66
77 Package: sendxmpp
88 Architecture: all
0 3.0 (quilt)
1515 #
1616 # Released under the terms of the GNU General Public License v2
1717 #
18 # $Platon: sendxmpp/sendxmpp,v 1.18 2009-01-10 11:40:14 rajo Exp $
18 # $Platon: sendxmpp/sendxmpp,v 1.20 2010-01-18 00:54:16 rajo Exp $
1919 # $Id: $
2020
2121 use Authen::SASL qw(Perl); # authentication broken if Authen::SASL::Cyrus module installed
2727 use open ':std';
2828
2929 # subroutines decls
30 sub xmpp_login($$$$$$$$);
30 sub xmpp_login($$$$$$$$$);
3131 sub xmpp_send ($$$$);
3232 sub xmpp_send_raw_xml($$);
3333 sub xmpp_send_message($$$$$$);
4343 sub main();
4444
4545 my # MakeMaker
46 $VERSION = [ q$Revision: 1.18 $ =~ m/(\S+)\s*$/g ]->[0];
46 $VERSION = [ q$Revision: 1.20 $ =~ m/(\S+)\s*$/g ]->[0];
4747 my $RESOURCE = 'sendxmpp';
4848 my $VERBOSE = 0;
4949 my $DEBUG = 0;
7171
7272 # login to xmpp
7373 my $cnx = xmpp_login ($$cmdline{'jserver'} || $$config{'jserver'},
74 $$cmdline{'port'} || $$config{'port'},
74 $$cmdline{'port'} || $$config{'port'} || ($$cmdline{'ssl'} ? 5223 : 5222),
7575 $$cmdline{'username'} || $$config{'username'},
7676 $$cmdline{'password'} || $$config{'password'},
7777 $$cmdline{'component'}|| $$config{'component'},
7878 $$cmdline{'resource'},
7979 $$cmdline{'tls'},
80 $$cmdline{'ssl'},
8081 $$cmdline{'debug'})
8182 or error_exit("cannot login: $!");
8283
205206 usage() unless (scalar(@ARGV));
206207
207208 my ($subject,$file,$resource,$jserver,$port,$username,$password,$component,
208 $message, $chatroom, $headline, $debug, $tls, $interactive, $help, $raw, $verbose);
209 $message, $chatroom, $headline, $debug, $tls, $ssl, $interactive, $help, $raw, $verbose);
209210 my $res = GetOptions ('subject|s=s' => \$subject,
210211 'file|f=s' => \$file,
211212 'resource|r=s' => \$resource,
218219 'message-type=s' => \$message_type,
219220 'chatroom|c' => \$chatroom,
220221 'tls|t' => \$tls,
222 'ssl|e' => \$ssl,
221223 'interactive|i' => \$interactive,
222224 'help|usage|h' => \$help,
223225 'debug|d' => \$debug,
243245
244246 if (scalar(grep { $message_type eq $_ } @suppported_message_types) == 0) {
245247 error_exit("Unsupported message type '$message_type'");
248 }
249
250 if ($ssl && $tls) {
251 error_exit("Connect securely wether using -e (--ssl) or -t (--tls)");
246252 }
247253
248254 if ($headline) {
272278 'message-type' => $message_type,
273279 'interactive' => ($interactive or 0),
274280 'tls' => ($tls or 0),
281 'ssl' => ($ssl or 0),
275282 'debug' => ($debug or 0),
276283 'verbose' => ($verbose or 0),
277284 'raw' => ($raw or 0),
290297
291298 #
292299 # xmpp_login: login to the xmpp (jabber) server
293 # input: hostname,port,username,password,resource,tls,debug
300 # input: hostname,port,username,password,resource,tls,ssl,debug
294301 # output: an XMPP connection object
295302 #
296 sub xmpp_login ($$$$$$$$) {
297
298 my ($host, $port, $user, $pw, $comp, $res, $tls, $debug) = @_;
303 sub xmpp_login ($$$$$$$$$) {
304
305 my ($host, $port, $user, $pw, $comp, $res, $tls, $ssl, $debug) = @_;
299306 my $cnx = new Net::XMPP::Client(debuglevel=>($debug?2:0));
300307 error_exit "could not create XMPP client object: $!"
301308 unless ($cnx);
303310 my @res;
304311 my $arghash = {
305312 hostname => $host,
313 port => $port,
306314 tls => $tls,
315 ssl => $ssl,
307316 connectiontype => 'tcpip',
308317 componentname => $comp
309318 };
580589
581590 Connect securely, using TLS
582591
592 =item B<-e>,B<--ssl>
593
594 Connect securely, using SSL
595
583596 =item B<-l>,B<--headline>
584597
585598 Backward compatibility option. You should use B<--message-type=headline> instead. Send a headline type message (not stored in offline messages)