summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-command.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-07-02 21:29:44 +0200
committerSebastien Helleu <flashcode@flashtux.org>2013-07-02 21:29:44 +0200
commit7ab034b52bb95bd814774fb9e2865b6abbb5893d (patch)
tree3bb9b7d83a46c212a2dc242e2f3f2fd1c5f02e34 /src/plugins/irc/irc-command.c
parent5e1c88a4761c62dd35701c957f77642a4aefef48 (diff)
downloadweechat-7ab034b52bb95bd814774fb9e2865b6abbb5893d.zip
irc: fix error message on /invite without arguments (bug #39272)
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r--src/plugins/irc/irc-command.c10
1 files changed, 10 insertions, 0 deletions
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]))