juks (juks) wrote in changelog,
juks
juks
changelog

[livejournal] r17959: r74 fix

Committer: iaskarov
r74 fix
U   trunk/cgi-bin/BotCheck.pm
Modified: trunk/cgi-bin/BotCheck.pm
===================================================================
--- trunk/cgi-bin/BotCheck.pm	2010-12-17 07:22:05 UTC (rev 17958)
+++ trunk/cgi-bin/BotCheck.pm	2010-12-17 07:46:57 UTC (rev 17959)
@@ -122,7 +122,7 @@
 sub is_bot {
 	my ($class, $useragent) = @_;
 		
-	return defined $useragent ? $useragent =~ $crawler_agents ne "" : 0;
+	return defined $useragent && $useragent =~ $crawler_agents;
 }
 
 1;

Tags: juks, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments