0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-30 12:48:54 +02:00

chmode: properly validate chm_throttle mode parameters

This commit is contained in:
William Pitcock 2016-01-05 19:02:44 -06:00
parent 5810d36e0a
commit 90552e214c

View file

@ -1165,7 +1165,7 @@ chm_throttle(struct Client *source_p, struct Channel *chptr,
{ {
sscanf(parv[(*parn)], "%d:%d", &joins, &timeslice); sscanf(parv[(*parn)], "%d:%d", &joins, &timeslice);
if(!joins || !timeslice) if(joins <= 0 || timeslice <= 0)
return; return;
mode_changes[mode_count].letter = c; mode_changes[mode_count].letter = c;