mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-27 18:45:15 +00:00
WHOIS command: make sure the reply ends with RPL_ENDOFWHOIS
Up to now, each reply for itself ended in RPL_ENDOFWHOIS and queries for unknown nick names lacked the RPL_ENDOFWHOIS -- both is wrong.
This commit is contained in:
@@ -1109,8 +1109,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
|
|||||||
Client_Away(c)))
|
Client_Away(c)))
|
||||||
return DISCONNECTED;
|
return DISCONNECTED;
|
||||||
|
|
||||||
return IRC_WriteStrClient(from, RPL_ENDOFWHOIS_MSG,
|
return CONNECTED;
|
||||||
Client_ID(from), Client_ID(c));
|
|
||||||
} /* IRC_WHOIS_SendReply */
|
} /* IRC_WHOIS_SendReply */
|
||||||
|
|
||||||
|
|
||||||
@@ -1219,10 +1218,12 @@ IRC_WHOIS( CLIENT *Client, REQUEST *Req )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (match_count == 0)
|
if (match_count == 0)
|
||||||
return IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG,
|
IRC_WriteStrClient(Client, ERR_NOSUCHNICK_MSG,
|
||||||
Client_ID(Client), Req->argv[Req->argc - 1]);
|
Client_ID(Client),
|
||||||
|
Req->argv[Req->argc - 1]);
|
||||||
}
|
}
|
||||||
return CONNECTED;
|
return IRC_WriteStrClient(from, RPL_ENDOFWHOIS_MSG,
|
||||||
|
Client_ID(from), Req->argv[Req->argc - 1]);
|
||||||
} /* IRC_WHOIS */
|
} /* IRC_WHOIS */
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user