summaryrefslogtreecommitdiff
path: root/src/plugins/ruby
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:46 +0100
committerSebastien Helleu <flashcode@flashtux.org>2014-02-21 13:37:46 +0100
commitdecbaf306d03aaaba9da2e74442e869eddb1cb6c (patch)
tree2d461c0f4a8c9ccbdb73ee82aaf166ae742b7b7d /src/plugins/ruby
parentd86d6013ef73da81ee36bfba7309191f5016711e (diff)
downloadweechat-decbaf306d03aaaba9da2e74442e869eddb1cb6c.zip
ruby: return WEECHAT_RC_ERROR in command /ruby if arguments are wrong/missing
Diffstat (limited to 'src/plugins/ruby')
-rw-r--r--src/plugins/ruby/weechat-ruby.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c
index cb392da1a..2dfdb8bbd 100644
--- a/src/plugins/ruby/weechat-ruby.c
+++ b/src/plugins/ruby/weechat-ruby.c
@@ -813,6 +813,8 @@ weechat_ruby_command_cb (void *data, struct t_gui_buffer *buffer,
{
weechat_ruby_unload_all ();
}
+ else
+ return WEECHAT_RC_ERROR;
}
else
{
@@ -862,12 +864,7 @@ weechat_ruby_command_cb (void *data, struct t_gui_buffer *buffer,
ruby_quiet = 0;
}
else
- {
- weechat_printf (NULL,
- weechat_gettext ("%s%s: unknown option for "
- "command \"%s\""),
- weechat_prefix ("error"), RUBY_PLUGIN_NAME, "ruby");
- }
+ return WEECHAT_RC_ERROR;
}
return WEECHAT_RC_OK;