scripts/mcbot.cgi
changeset 33 56571d34d754
parent 25 a0fad312ea30
equal deleted inserted replaced
32:89fb9c6611ca 33:56571d34d754
    15 	($a, $b) = split(/:/, $line, 2);
    15 	($a, $b) = split(/:/, $line, 2);
    16 	$a =~ s/^[\t ]+//;					# skip blanks
    16 	$a =~ s/^[\t ]+//;					# skip blanks
    17 	$b =~ s/^[\t ]+//;					# skip blanks
    17 	$b =~ s/^[\t ]+//;					# skip blanks
    18 	$b =~ s/[\n]+//;					# for html source :)
    18 	$b =~ s/[\n]+//;					# for html source :)
    19 
    19 
    20    	if ( $b && !($a =~ /mcbot/)) {
    20     if ( $b && !($a =~ /mcbot/)) {
    21     	if($b =~ /^http/ ) {
    21         if($b =~ /^http/ ) {
    22 	    	print "$a - <a href=\"$b\">$b</a><br>";
    22             print "$a - <a href=\"$b\">$b</a><br>";
    23    		} else {
    23         } else {
    24     		print "$a - $b<br>";
    24             print "$a - $b<br>";
    25 	    }
    25         }
    26    	}
    26     }
    27 }
    27 }
    28 
    28 
    29 print "\n<br>$a\n";
    29 print "\n<br>$a\n";
    30 
    30 
    31 print "</body></html>\n";
    31 print "</body></html>\n";