bunkchat/proclaim

33 lines
1.1 KiB
Bash
Executable File

#!/bin/sh -e
# make username uppercase
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
timezone=UTC
chatlog=/var/log/bunkchat/chat.log
prompt=""
makeprompt() {
time=$(TZ=${timezone} date +%I:%M%p)
date=$(TZ=${timezone} date +%m/%d)
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
makeprompt
echo "${prompt}: $text" >> $chatlog
clear
done