From 4cfea99f87486704e5f17d075d488bc733ffa19e Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Mon, 26 Jul 2010 21:54:17 -0400 Subject: only search main room to prevent porn spam --- src/site.clj | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/site.clj b/src/site.clj index e38171e..1a9cc05 100644 --- a/src/site.clj +++ b/src/site.clj @@ -947,11 +947,10 @@ order by count desc limit ? offset ?") (defn ghetto-search-query [num-tokens] (str "select - content from messages, rooms - where messages.room_id=rooms.room_id + content from messages + where room_id = 1 and content ilike " (str-join " and content ilike " (take num-tokens (repeat "?"))) " and content like '%http://%' - and admin_only = 'f' order by message_id desc limit 250;")) -- cgit v1.2.3-70-g09d2