[SimBot-commits] CVS: simbot/plugins sqlite-logger.pl,1.48,1.49
Status: Abandoned
Brought to you by:
kstange
|
From: Pete P. <fou...@us...> - 2005-08-07 18:33:37
|
Update of /cvsroot/simbot/simbot/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26669/plugins Modified Files: sqlite-logger.pl Log Message: - use &SimBot::html_mask_email instead of doing it ourselves. - Don't link things when we can't figure out a protocol. This fixes things like km/h becoming links. Index: sqlite-logger.pl =================================================================== RCS file: /cvsroot/simbot/simbot/plugins/sqlite-logger.pl,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -p -r1.48 -r1.49 --- sqlite-logger.pl 28 Jul 2005 13:24:38 -0000 1.48 +++ sqlite-logger.pl 7 Aug 2005 18:33:27 -0000 1.49 @@ -991,34 +991,7 @@ sub linkify { if($url =~ m{^(\S+)@(\S+)\.(\S+)$}) { # probably an email address - my ($user, $host) = ($1, "${2}.${3}"); - my ($nuser, $nhost); - for(my $i; $i < length $user; $i++) { - $nuser .= '&#' . ord(substr($user, $i, 1)); - } - for(my $i; $i < length $host; $i++) { - $nhost .= '&#' . ord(substr($host, $i, 1)); - } - - $curWord = <<EOT; -<script type="text/javascript"> -var s='@'; -var w='to:'; -var u='ma'; -var l='$nuser'; -var d='il'; -var p='$nhost'; -document.write('<a href="'); -document.write(u+d); -document.write(w+l); -document.write(s+p); -document.write('">'); -document.write(l); -document.write(s+p); -document.write('</a>'); -</script><noscript>[email removed]</noscript> -EOT - + $curWord = &SimBot::html_mask_email($url); next; } @@ -1035,7 +1008,9 @@ EOT # Yup. Let's assume it's a web site... $host = 'http://' . $host; } - $curWord = qq(<a href="${host}/${path}">$curWord</a>); + if($host =~ m/:/) { + $curWord = qq(<a href="${host}/${path}">$curWord</a>); + } } } return join(' ', @words); |