mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-08 09:42:59 +00:00
IRC_SetPenalty(): Code cleanup
This commit is contained in:
@@ -538,7 +538,7 @@ va_dcl
|
|||||||
/**
|
/**
|
||||||
* Set a "penalty time" for an IRC client.
|
* Set a "penalty time" for an IRC client.
|
||||||
*
|
*
|
||||||
* Note: penalty times are never set for server links!
|
* Note: penalty times are never set for server links or remote clients!
|
||||||
*
|
*
|
||||||
* @param Client The client.
|
* @param Client The client.
|
||||||
* @param Seconds The additional "penalty time" to enforce.
|
* @param Seconds The additional "penalty time" to enforce.
|
||||||
@@ -551,10 +551,13 @@ IRC_SetPenalty( CLIENT *Client, time_t Seconds )
|
|||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Seconds > 0);
|
assert(Seconds > 0);
|
||||||
|
|
||||||
if( Client_Type( Client ) == CLIENT_SERVER ) return;
|
if (Client_Type(Client) == CLIENT_SERVER)
|
||||||
|
return;
|
||||||
|
|
||||||
c = Client_Conn(Client);
|
c = Client_Conn(Client);
|
||||||
if (c > NONE)
|
if (c <= NONE)
|
||||||
|
return;
|
||||||
|
|
||||||
Conn_SetPenalty(c, Seconds);
|
Conn_SetPenalty(c, Seconds);
|
||||||
} /* IRC_SetPenalty */
|
} /* IRC_SetPenalty */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user