- if ('global' eq $target) {
- if(exists($PARAMS->{$key})) {
- $conf->{'xmlrtorrent'}->{$key} = $val;
- if ('XMLURL' eq $key) {
- unless(defined($rtorrent = xmlrtorrent->new(
- 'XMLURL' => $conf->{'xmlrtorrent'}->{'XMLURL'},
- 'USERNAME' => $conf->{'xmlrtorrent'}->{'USERNAME'},
- 'USERNAME' => $conf->{'xmlrtorrent'}->{'PASSWORD'}))) {
- write_irssi('Could not initialize XMLRPC instance');
- return;
- }
- }
- } else {
- write_irssi('Key %s does not exist', $key);
+ foreach $p (@talkers) {
+ if ($p->{'NAME'} eq $target) {
+ $p->setval($key, $val);
+ return;