Among bans with the same creation time, prefer the one with longest lifetime.

This commit is contained in:
Jilles Tjoelker 2010-03-05 23:16:28 +01:00
parent 9470d75a42
commit 6229f9f83b

View file

@ -105,7 +105,9 @@ ms_ban(struct Client *client_p, struct Client *source_p, int parc, const char *p
if (ptr != NULL)
{
aconf = ptr->data;
if (aconf->created >= created)
if (aconf->created > created ||
(aconf->created == created &&
aconf->lifetime >= lifetime))
{
if (IsPerson(source_p))
sendto_one_notice(source_p,