--- web/cgi-bin/logo.cgi 2004/03/24 23:48:57 1.1 +++ web/cgi-bin/logo.cgi 2006/02/14 22:17:36 1.3 @@ -4,20 +4,25 @@ use strict; $| = 1; # Directory to find images in -my($dir) = "/web/i-scream/nwww/logos"; +my($dir) = "/web/i-scream/htdocs/logos"; # Pattern to match images - remember to escape my($pattern) = "\\.jpg\$"; # URL to images - must match $dir -my($url) = "http://nwww.i-scream.org/logos"; +my($url) = "http://www.i-scream.org/logos"; # Where the setbg command is -my($setbg) = "/web/i-scream/nwww.bin/setbg.pl"; +my($setbg) = "/web/i-scream/bin/setbg.pl"; # Code... my($imagepath) = `$setbg -r -p \'$pattern\' -b echo -f \' \' $dir`; chomp $imagepath; $imagepath =~ s/$dir/$url/; + +# Check for IPv6 +if($ENV{SERVER_ADDR} =~ /:/) { + $imagepath = "http://www.i-scream.org/images/ipv6-logo.gif"; +} print "Content-type: text/plain\n\n"; print $imagepath;