diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-05-12 23:10:30 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-05-12 23:10:30 +0200 |
commit | 57781e6b0dd2bf80dd27e82e086c0dc86ce38090 (patch) | |
tree | 8a63fa17b12f82b287a0f9753ce507fe7bed3642 /src | |
parent | d9c82e2103b53f3c2aae11ec8356de057f1cbbd9 (diff) | |
download | weechat-57781e6b0dd2bf80dd27e82e086c0dc86ce38090.zip |
irc: make reason optional in command /kill
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-command.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 21870de3e..0c05c066c 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2563,11 +2563,19 @@ irc_command_kill (void *data, struct t_gui_buffer *buffer, int argc, /* make C compiler happy */ (void) data; - if (argc < 3) + if (argc < 2) return WEECHAT_RC_ERROR; - irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, - "KILL %s :%s", argv[1], argv_eol[2]); + if (argc < 3) + { + irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "KILL %s", argv[1]); + } + else + { + irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, + "KILL %s :%s", argv[1], argv_eol[2]); + } return WEECHAT_RC_OK; } @@ -6002,7 +6010,7 @@ irc_command_init () weechat_hook_command ( "kill", N_("close client-server connection"), - N_("<nick> <reason>"), + N_("<nick> [<reason>]"), N_(" nick: nick\n" "reason: reason"), "%(nicks) %-", &irc_command_kill, NULL); |