6 . "$_EXEC/cgilite/logging.sh"
7 . "$_EXEC/cgilite/cgilite.sh"
8 . "$_EXEC/cgilite/session.sh"
9 . "$_EXEC/cgilite/storage.sh"
11 LOCATION="$(PATH "$PATH_INFO")"
12 LOCATION="${LOCATION#/}"
13 LOCATION="${LOCATION%%/*}"
17 printf '%s\r\n' 'Content-Type: text/html; charset=utf-8' \
18 "Content-Security-Policy: script-src 'none'" \
22 [meta name="viewport" content="width=device-width"]
23 [link rel="stylesheet" type="text/css" href="/webchat.css"]
27 [ "$QUERY_STRING" = settings ] && settings_menu
30 } |"$_EXEC/cgilite/html-sh.sed" -u
35 [form #settings method="POST" action="?"
36 [h1 Settings][a .settings href="?" Close]'
38 [a .section href="#nick" Nickname]
39 [div #nick [input name="nickname" value="%s"][submit "action" "nick" Set Cookie]]
40 ' "$(HTML "${nickname#\?}")"
42 [a .section href="#register" Register Nickname]
44 [p Registration will set a permanent Cookie in your Browser.
45 Registration requires neither a password, nor an email address.]
46 [input name="regnick" value="%s"][submit "action" "register" Register]
47 ]' "$(HTML "${nickname#\?}")"
51 . "$_EXEC/usernick.sh"
55 . "$_EXEC/cgilite/file.sh"
56 FILE "$_EXEC/webchat.css"
60 chatfile="$_DATA/${LOCATION}/channel"
65 if [ -d "$_DATA/${LOCATION}" ]; then
66 chatfile="$_DATA/${LOCATION}/?${SESSION_ID}"
74 if [ -d "$_DATA/@${LOCATION#~}" ]; then
75 pubinfo="$_DATA/@${LOCATION#~}/pubinfo"
80 '') yield_page front <<-EOF