diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/plugins/irc/irc-command.c | 9 |
2 files changed, 9 insertions, 3 deletions
@@ -1,10 +1,11 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2008-02-21 +ChangeLog - 2008-02-24 Version 0.2.7 (under dev!): + * command /whois is now authorized in private without argument (task #7482) * removed kernel info in CTCP VERSION reply (IRC plugin) (task #7494) * use of many addresses for one IRC server (auto-switch when a connexion fails), nicks are now set with one option "nicks" (task #6088) diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 80723a07a..f31146157 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -3441,7 +3441,7 @@ int irc_command_whois (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { - IRC_GET_SERVER(buffer); + IRC_GET_SERVER_CHANNEL(buffer); if (!ptr_server || !ptr_server->is_connected) return WEECHAT_RC_ERROR; @@ -3453,7 +3453,12 @@ irc_command_whois (void *data, struct t_gui_buffer *buffer, int argc, irc_server_sendf (ptr_server, "WHOIS %s", argv_eol[1]); else { - IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "whois"); + if (ptr_channel + && ((ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE) + || (ptr_channel->type == IRC_CHANNEL_TYPE_DCC_CHAT))) + irc_server_sendf (ptr_server, "WHOIS %s", ptr_channel->name); + else + IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "whois"); } return WEECHAT_RC_OK; |