summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fetter2013-09-12 17:43:21 +0000
committerDavid Fetter2013-09-12 17:43:21 +0000
commitd90db936a17f4e043dbd7ba3c27695f4384daf95 (patch)
treee33a9f76dc77f5f09101d8de0e445c2218b37468
parent5ee65c3f98e741e64ce2599237c597eb54d3c047 (diff)
Added IRC URLs, made sure they appear first.
-rw-r--r--docbot.conf2
-rwxr-xr-xdocbot.pl4
2 files changed, 3 insertions, 3 deletions
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";