From 6229f9f83be11c92ae7d46a53708295601c816f5 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Fri, 5 Mar 2010 23:16:28 +0100 Subject: [PATCH] Among bans with the same creation time, prefer the one with longest lifetime. --- modules/core/m_ban.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/core/m_ban.c b/modules/core/m_ban.c index 5341d2ee..8d4f2690 100644 --- a/modules/core/m_ban.c +++ b/modules/core/m_ban.c @@ -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,