git://git.camperquake.de
/
xmlrtorrent.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add talker selection
[xmlrtorrent.git]
/
xmlrtorrent.pm
diff --git
a/xmlrtorrent.pm
b/xmlrtorrent.pm
index
92cd1aa
..
b1c41b9
100644
(file)
--- a/
xmlrtorrent.pm
+++ b/
xmlrtorrent.pm
@@
-9,11
+9,15
@@
sub new {
my $class = shift;
my $self = {@_};
my $class = shift;
my $self = {@_};
- unless(exists($self->{'XMLURL'})
&&
defined($self->{'XMLURL'})) {
+ unless(exists($self->{'XMLURL'})
and
defined($self->{'XMLURL'})) {
return undef;
}
$self->{'__RPCClient'} = RPC::XML::Client->new($self->{'XMLURL'});
return undef;
}
$self->{'__RPCClient'} = RPC::XML::Client->new($self->{'XMLURL'});
+ if ((exists($self->{'USERNAME'}) and exists($self->{'PASSWORD'})) and
+ ($self->{'USERNAME'} ne '')) {
+ $self->{'__RPCClient'}->credentials('', $self->{'USERNAME'}, $self->{'PASSWORD'});
+ }
return bless($self, $class);
}
return bless($self, $class);
}