Stories
Slash Boxes
Comments

Slash Open Source Project

This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • by jamiemccarthy (414) on Monday November 04 2002, @06:53PM (#5421) Homepage
    Grep on it: grep -r subnetid * and you'll find it in Slash/Utility/Environment/Environment.pm. The last integer in a dotted-quad is replaced with 0:

            $user->{ipid}           = md5_hex($hostip);
            $user->{subnetid}       = $hostip;
            $user->{subnetid}       =~ s/(\d+\.\d+\.\d+)\.\d+/$1\.0/;
            $user->{subnetid}       = md5_hex($user->{subnetid});