From bd6aedbd2131d60cd3c0291405f03b25cf8b3326 Mon Sep 17 00:00:00 2001 From: Christian Garbs Date: Sat, 27 Dec 2008 00:45:54 +0100 Subject: [PATCH] add show command --- xmlrtorrent.pl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 -- 1.8.3.1