]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - extensions/ip_cloaking.c
Add description for LOCOPS message.
[irc/rqf/shadowircd.git] / extensions / ip_cloaking.c
index e0e4ca22a4d290727024766a8bb540c0803e6f8e..035913e9b3f068c317fb0c54e85ff228c3341dfd 100644 (file)
@@ -106,19 +106,13 @@ do_host_cloak_ip(const char *inbuf, char *outbuf)
                        continue;
                }
 
-               switch (ipv6)
-               {
-               case 1:
-                       if (sepcount < totalcount / 2)
-                               break;
-               case 0:
-                       if (sepcount < 2)
-                               break;
-               default:
-                       *tptr = chartable[(*tptr + accum) % 20];
+               if (ipv6 && sepcount < totalcount / 2)
+                       continue;
 
-               }
+               if (!ipv6 && sepcount < 2)
+                       continue;
 
+               *tptr = chartable[(*tptr + accum) % 20];
                accum = (accum << 1) | (accum >> 31);
        }
 }