summaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 15:27:05 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-07-07 15:27:05 +0000
commita1af610ac1916bc3a4f09962ac86a58883514e51 (patch)
tree2e83871b3d8cee1910edaf90b71e18ef7a3e2519 /extras
parent6b9d3c568d5c13353dab4aad657310a0ed933730 (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 'extras')
0 files changed, 0 insertions, 0 deletions