From: David Fetter Date: Thu, 12 Sep 2013 17:43:21 +0000 (-0700) Subject: Added IRC URLs, made sure they appear first. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d90db936a17f4e043dbd7ba3c27695f4384daf95;p=docbot.git Added IRC URLs, made sure they appear first. --- diff --git a/docbot.conf b/docbot.conf index 28f3ad2..947c1bc 100644 --- a/docbot.conf +++ b/docbot.conf @@ -51,7 +51,7 @@ bot: ircmaxchannels: 2 ircmaxsessions: 3 search: - urlpattern: '(http|ftp|news|bt|https)://' + urlpattern: '(http|ftp|news|bt|https|irc)://' maxresults: 4 maxwrap: 2 searchsite: 'http://pg-docbot.de/search/?q=' diff --git a/docbot.pl b/docbot.pl index 0a8222c..5767f72 100755 --- a/docbot.pl +++ b/docbot.pl @@ -3484,8 +3484,8 @@ sub handle_command_search { FROM docbot_url WHERE id IN ("; $query .= join("\n INTERSECT\n" => map {"$query_inner\n"} @keys); - $query .= ")"; - # FIXME: sort order + $query .= ")\n"; + $query .= "ORDER BY kurl LIKE 'irc%'";# FIXME: sort order my $st = $main::db->query($query, @keys); if (!defined($st)) { my $answer = "Database error";