Added core command MODLIST.
This commit is contained in:
1 parent
e93939d4cf
commit
411e08fd1c
4 files changed
+26
-1
No files matched your search
@@ -14,6 +14,7 @@ the popular Auto IRC bot.
|
|||||||
In this alpha5 release, we have added:
|
In this alpha5 release, we have added:
|
||||||
|
|
||||||
* LinkTitle module for returning the page title of links sent to a channel.
|
* LinkTitle module for returning the page title of links sent to a channel.
|
||||||
|
* Added core command MODLIST.
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
|
|||||||
@@ -434,6 +434,7 @@ undef $it;
|
|||||||
API::Std::cmd_add('MODLOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODLOAD, \&Core::Cmd::cmd_modload);
|
API::Std::cmd_add('MODLOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODLOAD, \&Core::Cmd::cmd_modload);
|
||||||
API::Std::cmd_add('MODUNLOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODUNLOAD, \&Core::Cmd::cmd_modunload);
|
API::Std::cmd_add('MODUNLOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODUNLOAD, \&Core::Cmd::cmd_modunload);
|
||||||
API::Std::cmd_add('MODRELOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODRELOAD, \&Core::Cmd::cmd_modreload);
|
API::Std::cmd_add('MODRELOAD', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODRELOAD, \&Core::Cmd::cmd_modreload);
|
||||||
|
API::Std::cmd_add('MODLIST', 1, 'cfunc.modules', \%Core::Cmd::HELP_MODLIST, \&Core::Cmd::cmd_modlist);
|
||||||
API::Std::cmd_add('SHUTDOWN', 2, 'cmd.shutdown', \%Core::Cmd::HELP_SHUTDOWN, \&Core::Cmd::cmd_shutdown);
|
API::Std::cmd_add('SHUTDOWN', 2, 'cmd.shutdown', \%Core::Cmd::HELP_SHUTDOWN, \&Core::Cmd::cmd_shutdown);
|
||||||
API::Std::cmd_add('RESTART', 2, 'cmd.restart', \%Core::Cmd::HELP_RESTART, \&Core::Cmd::cmd_restart);
|
API::Std::cmd_add('RESTART', 2, 'cmd.restart', \%Core::Cmd::HELP_RESTART, \&Core::Cmd::cmd_restart);
|
||||||
API::Std::cmd_add('REHASH', 2, 'cmd.rehash', \%Core::Cmd::HELP_REHASH, \&Core::Cmd::cmd_rehash);
|
API::Std::cmd_add('REHASH', 2, 'cmd.rehash', \%Core::Cmd::HELP_REHASH, \&Core::Cmd::cmd_rehash);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
===============================================================================
|
===============================================================================
|
||||||
|
* Added core command MODLIST.
|
||||||
* Added command level 3 for logchan-only command.
|
* Added command level 3 for logchan-only command.
|
||||||
* Added a LinkTitle module for getting the title of a web page posted in a
|
* Added a LinkTitle module for getting the title of a web page posted in a
|
||||||
channel.
|
channel.
|
||||||
|
|||||||
+23
-1
@@ -125,9 +125,31 @@ sub cmd_modreload
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Help hash for MODLIST. Spanish, French and German needed.
|
||||||
|
our %HELP_MODLIST = (
|
||||||
|
'en' => "This will return a list of all currently loaded modules. \2Syntax:\2 MODLIST",
|
||||||
|
);
|
||||||
|
# MODLIST callback.
|
||||||
|
sub cmd_modlist
|
||||||
|
{
|
||||||
|
my ($src, undef) = @_;
|
||||||
|
|
||||||
|
# Iterate through all loaded modules.
|
||||||
|
my $str;
|
||||||
|
foreach (keys %API::Std::MODULE) {
|
||||||
|
$str .= ", \2$_\2 (v".$API::Std::MODULE{$_}{version}.')';
|
||||||
|
}
|
||||||
|
|
||||||
|
# Return it.
|
||||||
|
$str = substr $str, 2;
|
||||||
|
notice($src->{svr}, $src->{nick}, "\2Module List:\2 $str");
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
# Help hash for SHUTDOWN. Spanish, French and German needed.
|
# Help hash for SHUTDOWN. Spanish, French and German needed.
|
||||||
our %HELP_SHUTDOWN = (
|
our %HELP_SHUTDOWN = (
|
||||||
'en' => 'This will send out shutdown notifications, quit all networks, flush the database then exit the program.',
|
'en' => "This will send out shutdown notifications, quit all networks, flush the database then exit the program. \2Syntax:\2 SHUTDOWN",
|
||||||
);
|
);
|
||||||
# SHUTDOWN callback.
|
# SHUTDOWN callback.
|
||||||
sub cmd_shutdown
|
sub cmd_shutdown
|
||||||
|
|||||||
Reference in new issue
Block a user