From: Christian Garbs Date: Fri, 26 Dec 2008 23:45:54 +0000 (+0100) Subject: add show command X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=xmlrtorrent.git;a=commitdiff_plain;h=bd6aedbd2131d60cd3c0291405f03b25cf8b3326 add show command --- diff --git a/xmlrtorrent.pl b/xmlrtorrent.pl index 12367cb..3e13500 100644 --- a/xmlrtorrent.pl +++ b/xmlrtorrent.pl @@ -308,6 +308,21 @@ sub cmd_show { my $target = shift; my $p; my $e; + + if (defined($target)) { + foreach $p (@talkers) { + if ($p->{'NAME'} eq $target) { + write_irssi($p->getconfstr()); + return; + } + } + write_irssi('No such module'); + } else { + write_irssi('Loaded talkers:'); + foreach $p (@talkers) { + write_irssi(' %s', $p->{'NAME'}); + }; + } } sub cmd_help { @@ -327,6 +342,7 @@ sub cmd_help { Supported commands: save: save the current configuration help [modulename]: display this help or module specific help + show [modulename]: show loaded modules or the current parameters of a module talker [modulename]: display or set the talker to use debug: enable debugging messages nodebug: disable debugging messages