From be70931a50f23c68e055602facce5736775f3fab Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 9 Jan 2007 00:25:18 +0000 Subject: Cache channel max bans value to save an O(n) loop of match() on every ban (etc) add git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6267 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/channels.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/channels.h') diff --git a/include/channels.h b/include/channels.h index a85e69dd1..17e7364a4 100644 --- a/include/channels.h +++ b/include/channels.h @@ -124,6 +124,10 @@ class chanrec : public Extensible prefixlist prefixes; + /** Maximum number of bans (cached) + */ + int maxbans; + public: /** The channels name. */ @@ -510,6 +514,10 @@ class chanrec : public Extensible */ bool IsBanned(userrec* user); + /** Clears the cached max bans value + */ + void ResetMaxBans(); + /** Destructor for chanrec */ virtual ~chanrec() { /* stub */ } -- cgit v1.2.3