1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 02:36:38 +02:00

Allow channels that have users in them that are not the access list to expire while in use.

This commit is contained in:
Adam
2013-01-21 06:46:28 -05:00
parent 421db75528
commit 369ca89c2e
+12 -2
View File
@@ -30,8 +30,18 @@ class ExpireCallback : public CallBack
bool expire = false;
if (!ci->c && Anope::CurTime - ci->last_used >= Config->CSExpire)
expire = true;
if (Anope::CurTime - ci->last_used >= Config->CSExpire)
{
if (ci->c)
{
time_t last_used = ci->last_used;
for (User::ChanUserList::const_iterator cit = ci->c->users.begin(), cit_end = ci->c->users.end(); cit != cit_end && last_used == ci->last_used; ++cit)
ci->AccessFor((*cit)->user);
expire = last_used == ci->last_used;
}
else
expire = true;
}
if (ci->HasFlag(CI_NO_EXPIRE))
expire = false;