bunkchat/proclaim

36 lines
1.2 KiB
Text
Raw Normal View History

#!/bin/sh -e
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
timezone=UTC
chatlog=/var/log/bunkchat/chat.log
prompt=""
makeSlug () {
# make time and date
time=$(TZ=${timezone} date +%I:%M%p)
date=$(TZ=${timezone} date +%m/%d)
# make name/time string
prompt="${username}-${date}-${time}"
}
# enter bunkchat mode (clear the screen)
clear
while true
do
echo "┏━┓┏━┓┏━┓┏━╸╻ ┏━┓╻┏┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸"
echo "┣━┛┣┳┛┃ ┃┃ ┃ ┣━┫┃┃┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ "
echo "╹ ╹┗╸┗━┛┗━╸┗━╸╹ ╹╹╹ ╹ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ "
echo "Proclaim your musings, $USER! This is a group chat with everyone on the server!"
echo "You may view current chat with 'heed'!"
echo "You may view old chat with 'scry'!"
echo "----------------------------------"
printf "speak to the server: "
read -r text
makeSlug
echo "${prompt}: $text" >> $chatlog
clear
done