diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-26 17:01:59 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-26 17:01:59 +0000 |
commit | 6d56b904fc9bf79dc954d2bd02ce7cc99f99b479 (patch) | |
tree | 25308fc368e2a6a5e602e71c674362903e0c3cfa /include | |
parent | 4327b13b6fe651261a8877e7a79cfd2752563ccb (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/channels.h | 8 |
1 files changed, 8 insertions, 0 deletions
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<char*> 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<char*> *GetUsers(); /** Creates a channel record and initialises it with default values */ |