add module specific help
[xmlrtorrent.git] / xmlrtorrent.pl
index 4c3e520..9d5a77d 100644 (file)
@@ -323,14 +323,25 @@ sub cmd_help {
     my $target = shift;
     my $p;
 
-    write_irssi(<<'EOT');
+    if (defined($target)) {
+        foreach $p (@talkers) {
+            if ($p->{'NAME'} eq $target) {
+                write_irssi($p->gethelpstr());
+                return;
+            }
+        }
+        write_irssi('No such module');
+    } else {
+       write_irssi(<<'EOT');
 Supported commands:
  save: save the current configuration
- help: display this help or module specific help
+ help [modulename]: 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
+;
+    }
 }
 
 sub cmd_talker {