Cleanup my_whois a bit.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@90 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1626,11 +1626,10 @@ BUILT_IN_COMMAND(do_mynames)
|
|||||||
|
|
||||||
BUILT_IN_COMMAND(my_whois)
|
BUILT_IN_COMMAND(my_whois)
|
||||||
{
|
{
|
||||||
char *channel = NULL;
|
|
||||||
char *nick = NULL;
|
char *nick = NULL;
|
||||||
|
|
||||||
if (command)
|
if (command)
|
||||||
{
|
{
|
||||||
char *nick = NULL;
|
|
||||||
if (!strcmp(command, "WILM"))
|
if (!strcmp(command, "WILM"))
|
||||||
nick = get_server_recv_nick(from_server);
|
nick = get_server_recv_nick(from_server);
|
||||||
else if (!strcmp(command, "WILN"))
|
else if (!strcmp(command, "WILN"))
|
||||||
@@ -1639,25 +1638,28 @@ BUILT_IN_COMMAND(my_whois)
|
|||||||
nick = last_sent_ctcp[0].to;
|
nick = last_sent_ctcp[0].to;
|
||||||
else if (!strcmp(command, "WILCR"))
|
else if (!strcmp(command, "WILCR"))
|
||||||
nick = last_ctcp[0].from;
|
nick = last_ctcp[0].from;
|
||||||
if (nick)
|
|
||||||
send_to_server("WHOIS %s %s", nick, nick);
|
if (!nick)
|
||||||
else
|
{
|
||||||
bitchsay("You have no friends");
|
bitchsay("You have no friends");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (args && *args)
|
||||||
|
{
|
||||||
|
while ((nick = next_arg(args, &args)))
|
||||||
|
send_to_server("WHOIS %s %s", nick, nick);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (args && *args)
|
|
||||||
{
|
|
||||||
|
|
||||||
while ((channel = next_arg(args, &args)))
|
|
||||||
send_to_server("WHOIS %s %s", channel, channel);
|
|
||||||
}
|
|
||||||
else if ((nick = get_target_by_refnum(0)) && !is_channel(nick))
|
|
||||||
send_to_server("WHOIS %s %s", nick, nick);
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
send_to_server("WHOIS %s %s", get_server_nickname(from_server),
|
nick = get_target_by_refnum(0);
|
||||||
get_server_nickname(from_server));
|
|
||||||
|
if (!nick || is_channel(nick))
|
||||||
|
nick = get_server_nickname(from_server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
send_to_server("WHOIS %s %s", nick, nick);
|
||||||
}
|
}
|
||||||
|
|
||||||
BUILT_IN_COMMAND(do_unkey)
|
BUILT_IN_COMMAND(do_unkey)
|
||||||
|
|||||||
Reference in New Issue
Block a user