summaryrefslogtreecommitdiff
path: root/include/mode.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-29 23:34:47 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-29 23:34:47 +0000
commit5e9a6b9186a8cbaaf65ae7d9cd9c0c033c91b497 (patch)
tree5e90ee569ad974e0affe96d02b3470345eb74192 /include/mode.h
parentb848ca14335adcb924acb7977d93e0d76b9437b7 (diff)
Add counter system for umodes to get rid of some O(n)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6163 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mode.h b/include/mode.h
index b3c580e6c..62374be6c 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -132,6 +132,10 @@ class ModeHandler : public Extensible
*/
char prefix;
+ /** Number of items with this mode set on them
+ */
+ static unsigned int count;
+
public:
/**
* The constructor for ModeHandler initalizes the mode handler.
@@ -164,6 +168,9 @@ class ModeHandler : public Extensible
* value for this mode prefix.
*/
char GetPrefix();
+ /** Get number of items with this mode set on them
+ */
+ virtual unsigned int GetCount();
/**
* Get the 'value' of this modes prefix.
* determines which to display when there are multiple.