#!/bin/sh
-_EXEC=.
-_DATA=.
+_EXEC="${_EXEC:-.}"
+_DATA="${_DATA:-.}"
SESSION_TIMEOUT=43200
. "$_EXEC/cgilite/logging.sh"
. "$_EXEC/cgilite/cgilite.sh"
case ${LOCATION} in
webchat.css)
. "$_EXEC/cgilite/file.sh"
- FILE "$_EXEC/webchat.css"
- exit 0
+ FILE "$_EXEC/${LOCATION}"
+ return 0
;;
\&?*)
+ [ "$(COOKIE nick)" -o "$QUERY_STRING" = settings ] || REDIRECT "/$LOCATION?settings#nick"
chatfile="$_DATA/${LOCATION}/channel"
. "$_EXEC/channel.sh"
exit 0