X-Git-Url: http://git.pond.sub.org/?p=eow;a=blobdiff_plain;f=web.lisp;h=ac6a94ac3134e1fa5c90f791b2574a833a7eb67a;hp=96aca61708bc8f95acd11d79255cc801ed9a980f;hb=267c9093442c53131316fc813fe7d7cafc751af8;hpb=cb4d7092bd39cb0dc6f39c15d6fda7ec2ae311b0 diff --git a/web.lisp b/web.lisp index 96aca61..ac6a94a 100644 --- a/web.lisp +++ b/web.lisp @@ -53,12 +53,12 @@ (defgeneric prompt (session minutes btus)) (defgeneric data (session message)) -(defvar *session*) +(defvar *empire-session*) (defun update () "Send stream of updates to client" (with-session - (locked-queue:dequeue (update-queue *session*)))) + (locked-queue:dequeue (update-queue *empire-session*)))) (defmethod send ((s session) string) "Push a javascript update fragment to the client." @@ -71,8 +71,8 @@ (send s (parenscript:ps* `(msg ,message)))) (defmacro with-session (&body body) - `(let ((*session* (session-value 'session))) - (if *session* + `(let ((*empire-session* (session-value 'session))) + (if *empire-session* (progn ,@body) (redirect +login-page+)))) @@ -88,7 +88,7 @@ (defun command-action () (with-session - (empire:send-message (connection *session*) (get-parameter "q")))) + (empire:send-message (connection *empire-session*) (get-parameter "q")))) (defun root-page () (with-session