summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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)