mirror of
https://github.com/osmarks/ngircd.git
synced 2025-03-13 20:48:11 +00:00
IRC_Send_LUSERS(): Code cleanup
This commit is contained in:
parent
a71abfef4b
commit
43509fd22c
@ -1277,6 +1277,12 @@ IRC_WHOWAS( CLIENT *Client, REQUEST *Req )
|
||||
} /* IRC_WHOWAS */
|
||||
|
||||
|
||||
/**
|
||||
* Send LUSERS reply to a client.
|
||||
*
|
||||
* @param Client The receipient of the information.
|
||||
* @return CONNECTED or DISCONNECTED.
|
||||
*/
|
||||
GLOBAL bool
|
||||
IRC_Send_LUSERS(CLIENT *Client)
|
||||
{
|
||||
@ -1288,27 +1294,37 @@ IRC_Send_LUSERS( CLIENT *Client )
|
||||
assert(Client != NULL);
|
||||
|
||||
/* Users, services and serevers in the network */
|
||||
if( ! IRC_WriteStrClient( Client, RPL_LUSERCLIENT_MSG, Client_ID( Client ), Client_UserCount( ), Client_ServiceCount( ), Client_ServerCount( ))) return DISCONNECTED;
|
||||
if (!IRC_WriteStrClient(Client, RPL_LUSERCLIENT_MSG, Client_ID(Client),
|
||||
Client_UserCount(), Client_ServiceCount(),
|
||||
Client_ServerCount()))
|
||||
return DISCONNECTED;
|
||||
|
||||
/* Number of IRC operators */
|
||||
cnt = Client_OperCount( );
|
||||
if( cnt > 0 )
|
||||
{
|
||||
if( ! IRC_WriteStrClient( Client, RPL_LUSEROP_MSG, Client_ID( Client ), cnt )) return DISCONNECTED;
|
||||
if (cnt > 0) {
|
||||
if (!IRC_WriteStrClient(Client, RPL_LUSEROP_MSG,
|
||||
Client_ID(Client), cnt))
|
||||
return DISCONNECTED;
|
||||
}
|
||||
|
||||
/* Unknown connections */
|
||||
cnt = Client_UnknownCount( );
|
||||
if( cnt > 0 )
|
||||
{
|
||||
if( ! IRC_WriteStrClient( Client, RPL_LUSERUNKNOWN_MSG, Client_ID( Client ), cnt )) return DISCONNECTED;
|
||||
if (cnt > 0) {
|
||||
if (!IRC_WriteStrClient(Client, RPL_LUSERUNKNOWN_MSG,
|
||||
Client_ID(Client), cnt))
|
||||
return DISCONNECTED;
|
||||
}
|
||||
|
||||
/* Number of created channels */
|
||||
if( ! IRC_WriteStrClient( Client, RPL_LUSERCHANNELS_MSG, Client_ID( Client ), Channel_Count( ))) return DISCONNECTED;
|
||||
if (!IRC_WriteStrClient(Client, RPL_LUSERCHANNELS_MSG,
|
||||
Client_ID(Client), Channel_Count()))
|
||||
return DISCONNECTED;
|
||||
|
||||
/* Number of local users, services and servers */
|
||||
if( ! IRC_WriteStrClient( Client, RPL_LUSERME_MSG, Client_ID( Client ), Client_MyUserCount( ), Client_MyServiceCount( ), Client_MyServerCount( ))) return DISCONNECTED;
|
||||
if (!IRC_WriteStrClient(Client, RPL_LUSERME_MSG, Client_ID(Client),
|
||||
Client_MyUserCount(), Client_MyServiceCount(),
|
||||
Client_MyServerCount()))
|
||||
return DISCONNECTED;
|
||||
|
||||
#ifndef STRICT_RFC
|
||||
/* Maximum number of local users */
|
||||
|
Loading…
x
Reference in New Issue
Block a user