summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2009-04-11 21:37:03 +0200
committerSebastien Helleu <flashcode@flashtux.org>2009-04-11 21:37:03 +0200
commit741ca8fb6a2a77683210a91d42090b5349eb224d (patch)
treeb515232918cd81a8768e671eeafd0578feb54eed /src/plugins
parentacb57723343d61cc287a260333c28d802d6ea70f (diff)
downloadweechat-741ca8fb6a2a77683210a91d42090b5349eb224d.zip
Fix /me command (irc plugin): allow command without argument
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-command.c22
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;
}