bunkchat/proclaim

33 lines
1.1 KiB
Text
Raw Permalink Normal View History

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