X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=xmlrtorrent.pl;h=4f63ba7dec6ea25f2b70a8f98eb56026983bbb5c;hb=2305567d52a804919bd0c200e160f79309430442;hp=c2d823c5ee343f64cdcd32148bf69f47d1293628;hpb=6f01f49f67344b3315da3eae52dabf30dee6ea26;p=xmlrtorrent.git diff --git a/xmlrtorrent.pl b/xmlrtorrent.pl index c2d823c..4f63ba7 100644 --- a/xmlrtorrent.pl +++ b/xmlrtorrent.pl @@ -30,7 +30,7 @@ my $PARAMS = { }; # activate debug here -my $debug = 1; +my $debug = 0; # "message public", SERVER_REC, char *msg, char *nick, char *address, char *target signal_add_last("message public" => sub {check_for_link(\@_,1,4,2,0);}); @@ -221,6 +221,7 @@ sub cmd_remote { $_->{'NAME'}, $_->{'BYTES_DONE'}, $_->{'SIZE_BYTES'}, + $_->{'BYTES_DONE'}*100/$_->{'SIZE_BYTES'}, $_->{'UP_RATE'}, $_->{'DOWN_RATE'}); } @@ -262,7 +263,7 @@ sub cmd_set { return; } } - write_irssi(undef, 'No such module'); + write_irssi('No such module'); } sub cmd_show { @@ -320,13 +321,13 @@ sub cmd_talker { foreach $p (@talkers) { if (($p->{'NAME'} eq $target) && ($p->{'TYPE'} eq 'talker')) { $talker = $p; - $conf->{'videosite'}->{'talker'} = $target; + $conf->{'xmlrtorrent'}->{'talker'} = $target; return; } } write_irssi('No such talker'); } else { - write_irssi('Current talker: %s', $conf->{'videosite'}->{'talker'}); + write_irssi('Current talker: %s', $conf->{'xmlrtorrent'}->{'talker'}); } } @@ -427,9 +428,13 @@ sub init_xmlrtorrent { $talker = $p; } } - write_debug(undef, 'Selected %s as talker', $talker->{'NAME'}); - $conf->{'videosite'}->{'talker'} = $talker->{'NAME'}; + write_debug('Selected %s as talker', $talker->{'NAME'}); + $conf->{'xmlrtorrent'}->{'talker'} = $talker->{'NAME'}; + # Loop through all plugins and load the config + foreach $p (@talkers) { + $conf->{'xmlrtorrent'}->{'config'}->{$p->{'NAME'}} = $p->mergeconfig($conf->{'xmlrtorrent'}->{'config'}->{$p->{'NAME'}}); + } # Restore the queue %torrentlist = %{$conf->{'xmlrtorrent'}->{'_QUEUE'}};