From 6d56b904fc9bf79dc954d2bd02ce7cc99f99b479 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 26 Apr 2005 17:01:59 +0000 Subject: Major *MAJOR* optimizations by double-referencing channels to users (never need to scan the entire user hash again except in very rare circumstances) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1197 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/channels.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/channels.h b/include/channels.h index 9b74c546d..3f5c69dff 100644 --- a/include/channels.h +++ b/include/channels.h @@ -105,6 +105,11 @@ class chanrec : public Extensible /** Count of users on the channel used for fast user counting */ long users; + + /** User list (casted to char*'s to stop forward declaration stuff) + * (chicken and egg scenario!) + */ + std::vector internal_userlist; /** Channel topic. * If this is an empty string, no channel topic is set. @@ -186,6 +191,9 @@ class chanrec : public Extensible void DecUserCounter(); long GetUserCounter(); + void AddUser(char* castuser); + void DelUser(char* castuser); + std::vector *GetUsers(); /** Creates a channel record and initialises it with default values */ -- cgit v1.3.1-10-gc9f91