1
0
Fork 0
mirror of https://github.com/perlbot/perlbuut synced 2025-06-07 16:05:40 -04:00
perlbuut/plugins/help.pm
Ryan Voots c74027840e fix a bug with help, i need to check $said->{backdressed} everywhere for errors, but i'll do that later
I've also attempted to make the substitution work on factoids, and actually save them.
i've also attempted to get geoip to work with the city database, we'll see
2010-03-12 20:15:19 -05:00

26 lines
586 B
Perl

use strict;
no warnings 'void';
sub {
my( $said, $pm ) = @_;
my $plugin_name = $said->{recommended_args}->[0];
if( length $plugin_name ) {
my $plugin = $pm->get_plugin( $plugin_name, $said );
if( $plugin ) {
print $plugin->{help_text};
}
else {
print "Sorry, no plugin named $plugin_name found." unless $said->{backdressed};
}
}
else {
print "Provides help text for a specific command. Try 'help echo'. See also the command 'plugins' to list all of the currently loaded plugins.";
}
};
__DATA__
Attempts to find the help for a plugin. Syntax help PLUGIN.