summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortim b <timb@camcompu.home>2010-08-03 23:37:25 -0700
committertim b <timb@camcompu.home>2010-08-03 23:37:25 -0700
commitaa06b93d39c2a6b3a67bc91a01a9f86c315966a8 (patch)
tree068757455a9849e1fc26afaacae8868730bfb688 /src
parent537d5ddb033fda636df847be814af383c565bbf9 (diff)
parent2a7b0ab6991051b917a4ee75435007f3fa06f5f3 (diff)
Merge branch 'master' of ssh://dump.fm/pichat/repo
Diffstat (limited to 'src')
-rw-r--r--src/site.clj10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/site.clj b/src/site.clj
index 2d41d84..20bbf62 100644
--- a/src/site.clj
+++ b/src/site.clj
@@ -316,7 +316,7 @@
user_id (db-user :user_id)
ip (get-ip request)
query (format "UPDATE users SET created_ip = '%s'::cidr WHERE user_id = %s" (str ip) (str user_id))]
- ; scott: taken out since we hit email limit (send-registration-email nick email)
+ (send-registration-email nick email)
(do-cmds query) ; timb: doing this update query rather than using previous insert because jdbc
; can't figure out how to convert to cidr on prepared statements
[(session-assoc-from-db db-user)
@@ -948,11 +948,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;"))
@@ -974,7 +973,8 @@ order by count desc limit ? offset ?")
(defn reset-request! [session {nick :nick}]
(if-let [info (fetch-nick nick)]
- (let [email (info :email)
+ (let [nick (info :nick) ; get correct casing
+ email (info :email)
hash (info :hash)
ts (System/currentTimeMillis)
token (reset-token nick hash ts)