aboutsummaryrefslogtreecommitdiffstats
path: root/src/command_parse.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-07-07 15:27:05 +0000
committerGravatar brain2006-07-07 15:27:05 +0000
commita1af610ac1916bc3a4f09962ac86a58883514e51 (patch)
tree2e83871b3d8cee1910edaf90b71e18ef7a3e2519 /src/command_parse.cpp
parentAdded hashing stuff to hold both user and channel modes in the watcher/handle... (diff)
Added masking stuff.
Basically, so that we can hold user modes and channel modes in the same list, we use bitwise masking. We have a list of handlers, 256 in size 0 through 255, and to work out where a mode handler is dependent on WHAT it is, we use this simple hashing algorithm (no collisions can occur): (modeletter - 65) | mask Where mask is 128 (10000000b) if its a user mode, or 0 (00000000b, duh) if its a channel mode. Smart, and much faster than using a map of pairs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4128 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/command_parse.cpp')
0 files changed, 0 insertions, 0 deletions