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 {
my $p;
if (exists($self->{'DESC'})) {
- $s .= "Description:\n " . $self->{'DESC'};
+ $s .= "Description:\n " . $self->{'DESC'} . "\n";
}
- $s .= " Options:\n";
+ $s .= "Options:\n";
foreach $k (keys(%{$self->{'_CONFIG'}->{'option'}})) {
$p = $self->{'_PARAMS'}->{$k}->[0];
$p =~ s/%/%%/g;