Proper range for fakechannel user count

This commit is contained in:
ManiacTwister 2018-11-26 20:13:37 +01:00
parent cee332ab83
commit 908f1c30c4

View file

@ -171,7 +171,7 @@ static int m_list(struct Client *client_p, struct Client *source_p, int parc, co
sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
"",
fakechannel->name,
(rand() % fakechannel->users_max + fakechannel->users_min),
(unsigned long)(fakechannel->users_min + rand() % (fakechannel->users_max +1 - fakechannel->users_min)),
fakechannel->topic);
}