From 7ab034b52bb95bd814774fb9e2865b6abbb5893d Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Tue, 2 Jul 2013 21:29:44 +0200 Subject: [PATCH] irc: fix error message on /invite without arguments (bug #39272) --- ChangeLog | 3 ++- src/plugins/irc/irc-command.c | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 81882e955..3adeef284 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu -v0.4.2-dev, 2013-06-29 +v0.4.2-dev, 2013-07-02 This document lists all changes for each version. @@ -30,6 +30,7 @@ Version 0.4.2 (under dev!) * core: fix line alignment when option weechat.look.buffer_time_format is set to empty string * aspell: add support of enchant library (patch #6858) +* irc: fix error message on /invite without arguments (bug #39272) * irc: add support of special variables $nick/$channel/$server in commands /allchan and /allserv * irc: add option irc.look.nick_color_hash: hash algorithm to find nick color diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 46dd7feee..b9e7dd2e7 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -1885,6 +1885,16 @@ irc_command_invite (void *data, struct t_gui_buffer *buffer, int argc, (void) data; (void) argv_eol; + if (argc < 2) + { + weechat_printf (NULL, + _("%s%s: missing arguments for \"%s\" " + "command"), + weechat_prefix ("error"), IRC_PLUGIN_NAME, + "invite"); + return WEECHAT_RC_OK; + } + if (argc > 2) { if (irc_channel_is_channel (ptr_server, argv[argc - 1]))