summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 13:21:35 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 13:21:35 +0000
commitc330b24501fc56516fef098428889a0a526e706a (patch)
tree83a64774409c8c6808dd4c6a2587ca89229e9e97 /include
parent68da120812b1e593c76ea75d0d591f47b6a4f402 (diff)
Added userrec::modebits - fast way of checking if user has +swi rather than an icky strchr
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3588 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/mode.h6
-rw-r--r--include/users.h7
2 files changed, 13 insertions, 0 deletions
diff --git a/include/mode.h b/include/mode.h
index 973e9c22b..54b4aa97e 100644
--- a/include/mode.h
+++ b/include/mode.h
@@ -29,6 +29,12 @@
#include "channels.h"
#include "ctables.h"
+enum UserModeBits {
+ UM_INVISIBLE = 1,
+ UM_SERVERNOTICE = 2,
+ UM_WALLOPS = 3
+};
+
class ModeParser
{
private:
diff --git a/include/users.h b/include/users.h
index 294bc1e1f..e7ad4b9d9 100644
--- a/include/users.h
+++ b/include/users.h
@@ -150,6 +150,13 @@ class userrec : public connection
* an optional + character.
*/
char modes[54];
+
+ /** This contains a bitmask of the RFC modes +swi,
+ * which can be used for fast lookup when iterating all the users.
+ * It is maintained by the mode parser and matches the character
+ * modes stored in 'modes'.
+ */
+ char modebits;
std::vector<ucrec*> chans;