diff --git a/heed b/heed index 96a82d5..1037b8c 100755 --- a/heed +++ b/heed @@ -1,12 +1,17 @@ #!/bin/sh -e +chatlog="/var/log/bunkchat/chat.log" + clear -figlet -f future heed - bunkchat +echo "╻ ╻┏━╸┏━╸╺┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸" +echo "┣━┫┣╸ ┣╸ ┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ " +echo "╹ ╹┗━╸┗━╸╺┻┛ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ " + echo "#######################################################################" -echo "# Take heed, $USER! This is a group chat with everyone on the server! #" -echo "# You can view earlier chat with 'scry' or 'less /srv/bunkchat.txt' #" +echo " Take heed, $USER! This is a group chat with everyone on the server!" +echo " You can view earlier chat with 'scry' or 'less /srv/bunkchat.txt'" echo "#######################################################################" echo -tail -f /srv/bunkchat.txt +tail -f $chatlog diff --git a/proclaim b/proclaim index 48391ce..31274a2 100755 --- a/proclaim +++ b/proclaim @@ -1,17 +1,18 @@ -#!/bin/bash -e +#!/bin/sh -e # make username uppercase username=$(echo "$USER" | tr '[:lower:]' '[:upper:]') -timezone="America/New_York" -declare prompt +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 time and date + time=$(TZ=${timezone} date +%I:%M%p) + date=$(TZ=${timezone} date +%m/%d) - # make name/time string - prompt="${username}-${date}-${time}" + # make name/time string + prompt="${username}-${date}-${time}" } # enter bunkchat mode (clear the screen) @@ -19,11 +20,14 @@ clear while true do - figlet -f future proclaim - bunkchat - echo "You may view old chat with 'scry', heathen." - echo "-------------------------------------------" - read -r -p "speak to the server: " text - makeSlug - echo "${prompt}: $text" >> /srv/bunkchat.txt - clear + echo "┏━┓┏━┓┏━┓┏━╸╻ ┏━┓╻┏┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸" + echo "┣━┛┣┳┛┃ ┃┃ ┃ ┣━┫┃┃┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ " + echo "╹ ╹┗╸┗━┛┗━╸┗━╸╹ ╹╹╹ ╹ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ " + echo "You may view old chat with 'scry'!" + echo "----------------------------------" + printf "speak to the server: " >&2 + read -r text + makeSlug + echo "${prompt}: $text" >> $chatlog + clear done diff --git a/scry b/scry index 432c623..01dcf43 100755 --- a/scry +++ b/scry @@ -1,3 +1,4 @@ #!/bin/sh -e +chatlog="/var/log/bunkchat/chat.log" -less /srv/bunkchat.txt +less $chatlog