summaryrefslogtreecommitdiff
path: root/src/user.clj
diff options
context:
space:
mode:
Diffstat (limited to 'src/user.clj')
-rw-r--r--src/user.clj6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/user.clj b/src/user.clj
index d105e29..387a7ad 100644
--- a/src/user.clj
+++ b/src/user.clj
@@ -2,6 +2,12 @@
(:use compojure
utils))
+(defstruct user-struct :nick :user_id :avatar :last-seen)
+
+(defn user-struct-from-session [session]
+ (struct user-struct (session :nick) (session :user_id) (session :avatar)
+ (System/currentTimeMillis)))
+
(def *nick-regex* #"^[A-Za-z0-9\-_âˆb˚†]*$")
(defn is-invalid-nick? [n]