git://git.camperquake.de
/
xmlrtorrent.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a4e8721
)
add talker selection
author
Christian Garbs
<mitch@cgarbs.de>
Fri, 26 Dec 2008 21:58:41 +0000
(22:58 +0100)
committer
Ralf Ertzinger
<sun@lain.camperquake.de>
Sun, 28 Dec 2008 21:08:41 +0000
(22:08 +0100)
xmlrtorrent.pl
patch
|
blob
|
history
diff --git
a/xmlrtorrent.pl
b/xmlrtorrent.pl
index
71b3b3e
..
4c3e520
100644
(file)
--- a/
xmlrtorrent.pl
+++ b/
xmlrtorrent.pl
@@
-78,6
+78,10
@@
my $xmlrtorrent_commands = {
cmd_remote(@_);
},
cmd_remote(@_);
},
+ 'talker' => sub {
+ cmd_talker(@_);
+ },
+
'debug' => sub {
$debug = 1;
write_irssi('Enabled debugging');
'debug' => sub {
$debug = 1;
write_irssi('Enabled debugging');
@@
-321,13
+325,33
@@
sub cmd_help {
write_irssi(<<'EOT');
Supported commands:
write_irssi(<<'EOT');
Supported commands:
- save: Save the current configuration
- help: Display this help
+ save: save the current configuration
+ help: display this help or module specific help
+ talker [modulename]: display or set the talker to use
debug: enable debugging messages
nodebug: disable debugging messages
EOT
}
debug: enable debugging messages
nodebug: disable debugging messages
EOT
}
+sub cmd_talker {
+ my $target = shift;
+ my $p;
+
+ if (defined($target)) {
+ foreach $p (@talkers) {
+ if (($p->{'NAME'} eq $target) && ($p->{'TYPE'} eq 'talker')) {
+ $talker = $p;
+ $conf->{'videosite'}->{'talker'} = $target;
+ return;
+ }
+ }
+ write_irssi('No such talker');
+ } else {
+ write_irssi('Current talker: %s', $conf->{'videosite'}->{'talker'});
+ }
+}
+
+
# save on unload
sub sig_command_script_unload {
# save on unload
sub sig_command_script_unload {