Enhancement #750 » 0012-sanitize-link_server-lag-shouldn-t-be-allowed-to-go-.patch
src/irc.c | ||
---|---|---|
*/
|
||
void irc_compute_lag(struct link_server *is)
|
||
{
|
||
time_t lag;
|
||
assert(is->laginit_ts != -1);
|
||
is->lag = time(NULL) - is->laginit_ts;
|
||
lag = time(NULL) - is->laginit_ts;
|
||
if (lag > LAGOUT_TIME*2)
|
||
is->lag = LAGOUT_TIME*2;
|
||
else
|
||
is->lag = (unsigned)lag;
|
||
}
|
||
int irc_lags_out(struct link_server *is)
|
src/irc.h | ||
---|---|---|
size_t user_mode_len;
|
||
/* init stuff */
|
||
int lag;
|
||
int laginit_ts;
|
||
unsigned lag;
|
||
time_t laginit_ts;
|
||
int lagtest_timeout;
|
||
/* chanmodes */
|