summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-26 15:14:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-26 15:14:05 +0000
commit90b9864a0ec58f1ad5afdd9bdd7dc51039c23562 (patch)
tree0e662a435d91c78ab19f4eebbc80393446f6d64b /include
parent1f56002af538fe6e2ddaecb96add7053245ad3ad (diff)
Added channel 'counter', increases speed of quits, parts, kicks
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1194 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/channels.h9
-rw-r--r--include/inspircd.h2
2 files changed, 10 insertions, 1 deletions
diff --git a/include/channels.h b/include/channels.h
index 633d7edef..9b74c546d 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -101,6 +101,10 @@ class chanrec : public Extensible
* Plugins may use this field in any way they see fit.
*/
char custom_modes[MAXMODES]; /* modes handled by modules */
+
+ /** Count of users on the channel used for fast user counting
+ */
+ long users;
/** Channel topic.
* If this is an empty string, no channel topic is set.
@@ -178,6 +182,11 @@ class chanrec : public Extensible
*/
std::string GetModeParameter(char mode);
+ void IncUserCounter();
+ void DecUserCounter();
+ long GetUserCounter();
+
+
/** Creates a channel record and initialises it with default values
*/
chanrec();
diff --git a/include/inspircd.h b/include/inspircd.h
index 220379d57..10852631a 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -132,7 +132,7 @@ void call_handler(const char* commandname,char **parameters, int pcnt, userrec *
long GetRevision();
int loop_call(handlerfunc fn, char **parameters, int pcnt, userrec *u, int start, int end, int joins);
void kick_channel(userrec *src,userrec *user, chanrec *Ptr, char* reason);
-void purge_empty_chans(void);
+void purge_empty_chans(userrec* user);
char* Passwd(userrec *user);
bool IsDenied(userrec *user);
void AddWhoWas(userrec* u);