diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-11 21:37:03 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2009-04-11 21:37:03 +0200 |
commit | 741ca8fb6a2a77683210a91d42090b5349eb224d (patch) | |
tree | b515232918cd81a8768e671eeafd0578feb54eed /src/plugins | |
parent | acb57723343d61cc287a260333c28d802d6ea70f (diff) | |
download | weechat-741ca8fb6a2a77683210a91d42090b5349eb224d.zip |
Fix /me command (irc plugin): allow command without argument
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-command.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index dae2904a3..aec937665 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -1873,23 +1873,17 @@ irc_command_me (void *data, struct t_gui_buffer *buffer, int argc, char **argv, (void) data; (void) argv; - if (argc > 1) + if (!ptr_channel) { - if (!ptr_channel) - { - weechat_printf (ptr_server->buffer, - _("%s%s: \"%s\" command can not be executed " - "on a server buffer"), + weechat_printf (ptr_server->buffer, + _("%s%s: \"%s\" command can not be executed " + "on a server buffer"), irc_buffer_get_server_prefix (ptr_server, "error"), - IRC_PLUGIN_NAME, "me"); - return WEECHAT_RC_OK; - } - irc_command_me_channel (ptr_server, ptr_channel, argv_eol[1]); - } - else - { - IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "me"); + IRC_PLUGIN_NAME, "me"); + return WEECHAT_RC_OK; } + irc_command_me_channel (ptr_server, ptr_channel, + (argc > 1) ? argv_eol[1] : NULL); return WEECHAT_RC_OK; } |