summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/command.c4
-rw-r--r--src/plugins/perl/wee-perl.c2
-rw-r--r--src/plugins/plugins.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/src/common/command.c b/src/common/command.c
index a5abbb0d8..bcd8b3031 100644
--- a/src/common/command.c
+++ b/src/common/command.c
@@ -66,7 +66,7 @@ t_weechat_command weechat_commands[] =
N_("[command]"), N_("command: name of a WeeChat or IRC command"),
0, 1, weechat_cmd_help, NULL },
{ "perl", N_("list/load/unload Perl scripts"),
- N_("[load filename] | [unload]"),
+ N_("[load filename] | [autoload] | [unload]"),
N_("filename: Perl script (file) to load\n"
"Without argument, /perl command lists all loaded Perl scripts."),
0, 2, weechat_cmd_perl, NULL },
@@ -1137,6 +1137,8 @@ weechat_cmd_perl (int argc, char **argv)
break;
case 1:
+ if (strcmp (argv[0], "autoload") == 0)
+ plugin_auto_load (PLUGIN_TYPE_PERL, "perl/autoload");
if (strcmp (argv[0], "unload") == 0)
{
/* unload all Perl scripts */
diff --git a/src/plugins/perl/wee-perl.c b/src/plugins/perl/wee-perl.c
index 12c0051c2..775b77b9b 100644
--- a/src/plugins/perl/wee-perl.c
+++ b/src/plugins/perl/wee-perl.c
@@ -480,6 +480,8 @@ wee_perl_load (char *filename)
{
/* execute Perl script */
wee_log_printf (_("loading Perl script \"%s\"\n"), filename);
+ irc_display_prefix (NULL, PREFIX_PLUGIN);
+ gui_printf (NULL, _("Loading Perl script \"%s\"\n"), filename);
return wee_perl_exec ("wee_perl_load_eval_file", filename);
}
diff --git a/src/plugins/plugins.h b/src/plugins/plugins.h
index ac073d4fe..db687dcc6 100644
--- a/src/plugins/plugins.h
+++ b/src/plugins/plugins.h
@@ -59,6 +59,7 @@ extern t_plugin_handler *last_plugin_cmd_handler;
extern t_plugin_script *perl_scripts;
#endif
+extern void plugin_auto_load (int, char *);
extern void plugin_init ();
extern void plugin_load (int, char *);
extern void plugin_unload (int, /*@null@*/ char *);