Project

General

Profile

Enhancement #750 » 0012-sanitize-link_server-lag-shouldn-t-be-allowed-to-go-.patch

Loïc Gomez, 2022-01-10 19:28

View differences:

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 */
(11-11/24)