mirror of
https://github.com/weechat/weechat.git
synced 2026-06-27 13:26:38 +02:00
perl: return WEECHAT_RC_ERROR in command /perl if arguments are wrong/missing
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user