summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-01-06 12:25:11 +0100
committerSebastien Helleu <flashcode@flashtux.org>2012-01-06 12:25:11 +0100
commitab46b37aed7eb2af7a8fd8e5dbfc126226903c0e (patch)
tree2dc3dce5912db9969e0539af6326ff56ee30a558 /src
parent4cde51a27ffbc45d05a6ff658bffbd5497af5472 (diff)
downloadweechat-ab46b37aed7eb2af7a8fd8e5dbfc126226903c0e.zip
irc: allow /mode without argument (display modes of current channel or user modes on server buffer)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-command.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 869519025..f7df667f2 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -2434,7 +2434,10 @@ irc_command_mode (void *data, struct t_gui_buffer *buffer, int argc,
}
else
{
- IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "mode");
+ if (ptr_channel)
+ irc_command_mode_server (ptr_server, ptr_channel, NULL);
+ else
+ irc_command_mode_server (ptr_server, NULL, ptr_server->nick);
}
return WEECHAT_RC_OK;