From 2f5e880e57be3d4881c47da991334c516e76ffaf Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 14 Sep 2015 12:24:13 -0400 Subject: Don't update channel last used time from ns alist access check --- src/regchannel.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/regchannel.cpp b/src/regchannel.cpp index 2b17c72ca..ebc542547 100644 --- a/src/regchannel.cpp +++ b/src/regchannel.cpp @@ -385,7 +385,7 @@ ChanAccess *ChannelInfo::GetAccess(unsigned index) const return acc; } -AccessGroup ChannelInfo::AccessFor(const User *u) +AccessGroup ChannelInfo::AccessFor(const User *u, bool updateLastUsed) { AccessGroup group; @@ -414,7 +414,8 @@ AccessGroup ChannelInfo::AccessFor(const User *u) if (group.founder || !group.empty()) { - this->last_used = Anope::CurTime; + if (updateLastUsed) + this->last_used = Anope::CurTime; for (unsigned i = 0; i < group.size(); ++i) group[i]->last_seen = Anope::CurTime; @@ -423,7 +424,7 @@ AccessGroup ChannelInfo::AccessFor(const User *u) return group; } -AccessGroup ChannelInfo::AccessFor(const NickCore *nc) +AccessGroup ChannelInfo::AccessFor(const NickCore *nc, bool updateLastUsed) { AccessGroup group; @@ -439,9 +440,10 @@ AccessGroup ChannelInfo::AccessFor(const NickCore *nc) } if (group.founder || !group.empty()) - this->last_used = Anope::CurTime; + if (updateLastUsed) + this->last_used = Anope::CurTime; - /* don't update access last seen here, this isn't the user requesting access */ + /* don't update access last seen here, this isn't the user requesting access */ return group; } -- cgit