mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-30 21:42:59 +00:00 
			
		
		
		
	IRC_WHOIS_SendReply(): Code cleanup
This commit is contained in:
		| @@ -1028,7 +1028,7 @@ IRC_WHO(CLIENT *Client, REQUEST *Req) | ||||
|  * @param Client The client from which this command has been received. | ||||
|  * @param from The client requesting the information ("originator"). | ||||
|  * @param c The client of which information should be returned. | ||||
|  * @returns		CONNECTED or DISCONNECTED. | ||||
|  * @return CONNECTED or DISCONNECTED. | ||||
|  */ | ||||
| static bool | ||||
| IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) | ||||
| @@ -1037,6 +1037,10 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) | ||||
| 	CL2CHAN *cl2chan; | ||||
| 	CHANNEL *chan; | ||||
|  | ||||
| 	assert(Client != NULL); | ||||
| 	assert(from != NULL); | ||||
| 	assert(c != NULL); | ||||
|  | ||||
| 	/* Nick, user, hostname and client info */ | ||||
| 	if (!IRC_WriteStrClient(from, RPL_WHOISUSER_MSG, Client_ID(from), | ||||
| 				Client_ID(c), Client_User(c), | ||||
| @@ -1100,8 +1104,8 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) | ||||
|  | ||||
| 	/* Connected using SSL? */ | ||||
| 	if (Conn_UsesSSL(Client_Conn(c)) && | ||||
| 		!IRC_WriteStrClient(from, RPL_WHOISSSL_MSG, | ||||
| 				    Client_ID(from), Client_ID(c))) | ||||
| 	    !IRC_WriteStrClient(from, RPL_WHOISSSL_MSG, Client_ID(from), | ||||
| 				Client_ID(c))) | ||||
| 		return DISCONNECTED; | ||||
|  | ||||
| 	/* Idle and signon time (local clients only!) */ | ||||
| @@ -1115,8 +1119,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c) | ||||
| 	/* Away? */ | ||||
| 	if (Client_HasMode(c, 'a') && | ||||
| 	    !IRC_WriteStrClient(from, RPL_AWAY_MSG, | ||||
| 				    Client_ID(from), Client_ID(c), | ||||
| 				    Client_Away(c))) | ||||
| 				Client_ID(from), Client_ID(c), Client_Away(c))) | ||||
| 		return DISCONNECTED; | ||||
|  | ||||
| 	return CONNECTED; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Alexander Barton
					Alexander Barton