summaryrefslogtreecommitdiff
path: root/src/plugins/perl
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:31 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:31 +0100
commitd86d6013ef73da81ee36bfba7309191f5016711e (patch)
tree751d22212d4b2f383d4791d0f909d86b7219c067 /src/plugins/perl
parent18fd85de7d4ee50ab7410ea5f869f23007d41b7b (diff)
downloadweechat-d86d6013ef73da81ee36bfba7309191f5016711e.zip
perl: return WEECHAT_RC_ERROR in command /perl if arguments are wrong/missing
Diffstat (limited to 'src/plugins/perl')
-rw-r--r--src/plugins/perl/weechat-perl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c
index e4fad167b..6ab7c59f3 100644
--- a/src/plugins/perl/weechat-perl.c
+++ b/src/plugins/perl/weechat-perl.c
@@ -673,6 +673,8 @@ weechat_perl_command_cb (void *data, struct t_gui_buffer *buffer,
{
weechat_perl_unload_all ();
}
+ else
+ return WEECHAT_RC_ERROR;
}
else
{
@@ -722,12 +724,7 @@ weechat_perl_command_cb (void *data, struct t_gui_buffer *buffer,
perl_quiet = 0;
}
else
- {
- weechat_printf (NULL,
- weechat_gettext ("%s%s: unknown option for "
- "command \"%s\""),
- weechat_prefix ("error"), PERL_PLUGIN_NAME, "perl");
- }
+ return WEECHAT_RC_ERROR;
}
return WEECHAT_RC_OK;