1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 09:43:13 +02:00

Command /whois is now authorized in private without argument (task #7482)

This commit is contained in:
Sebastien Helleu
2008-02-24 23:15:23 +01:00
parent b7513da92b
commit 27d1d81f98
2 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -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)
+7 -2
View File
@@ -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;