From cf8a24cd6baf4f8b101fc1d1edf6c0046d2b9b09 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 6 Aug 2006 19:51:15 +0000 Subject: Comments git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4747 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/socket.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/socket.cpp b/src/socket.cpp index c3f0a8d7a..0ad39701f 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -28,7 +28,11 @@ extern InspIRCd* ServerInstance; extern ServerConfig* Config; extern time_t TIME; -/* Used when comparing CIDR masks for the modulus bits left over */ +/* Used when comparing CIDR masks for the modulus bits left over. + * A lot of ircd's seem to do this: + * ((-1) << (8 - (mask % 8))) + * But imho, it sucks in comparison to a nice neat lookup table. + */ const char inverted_bits[8] = { 0x00, /* 00000000 - 0 bits - never actually used */ 0x80, /* 10000000 - 1 bits */ 0xC0, /* 11000000 - 2 bits */ -- cgit v1.2.3