change default chat.log location and tone of prompts
This commit is contained in:
parent
2815067b1c
commit
cd14df1f11
3 changed files with 30 additions and 20 deletions
13
heed
13
heed
|
@ -1,12 +1,17 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
chatlog=var/log/bunkchat/chat.log
|
||||||
|
|
||||||
clear
|
clear
|
||||||
|
|
||||||
figlet -f future heed - bunkchat
|
echo "╻ ╻┏━╸┏━╸╺┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸"
|
||||||
|
echo "┣━┫┣╸ ┣╸ ┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ "
|
||||||
|
echo "╹ ╹┗━╸┗━╸╺┻┛ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ "
|
||||||
|
|
||||||
echo "#######################################################################"
|
echo "#######################################################################"
|
||||||
echo "# Take heed, $USER! This is a group chat with everyone on the server! #"
|
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 " You can view earlier chat with 'scry' or 'less /srv/bunkchat.txt'"
|
||||||
echo "#######################################################################"
|
echo "#######################################################################"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
tail -f /srv/bunkchat.txt
|
tail -f $chatlog
|
||||||
|
|
34
proclaim
34
proclaim
|
@ -1,17 +1,18 @@
|
||||||
#!/bin/bash -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
# make username uppercase
|
# make username uppercase
|
||||||
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
|
username=$(echo "$USER" | tr '[:lower:]' '[:upper:]')
|
||||||
timezone="America/New_York"
|
timezone=UTC
|
||||||
declare prompt
|
chatlog=/var/log/bunkchat/chat.log
|
||||||
|
prompt=""
|
||||||
|
|
||||||
makeSlug () {
|
makeSlug () {
|
||||||
# make time and date
|
# make time and date
|
||||||
time=$(TZ=${timezone} date +%I:%M%p)
|
time=$(TZ=${timezone} date +%I:%M%p)
|
||||||
date=$(TZ=${timezone} date +%m/%d)
|
date=$(TZ=${timezone} date +%m/%d)
|
||||||
|
|
||||||
# make name/time string
|
# make name/time string
|
||||||
prompt="${username}-${date}-${time}"
|
prompt="${username}-${date}-${time}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# enter bunkchat mode (clear the screen)
|
# enter bunkchat mode (clear the screen)
|
||||||
|
@ -19,11 +20,14 @@ clear
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
figlet -f future proclaim - bunkchat
|
echo "┏━┓┏━┓┏━┓┏━╸╻ ┏━┓╻┏┳┓ ┏┓ ╻ ╻┏┓╻╻┏ ┏━╸╻ ╻┏━┓╺┳╸"
|
||||||
echo "You may view old chat with 'scry', heathen."
|
echo "┣━┛┣┳┛┃ ┃┃ ┃ ┣━┫┃┃┃┃ ╺━╸ ┣┻┓┃ ┃┃┗┫┣┻┓┃ ┣━┫┣━┫ ┃ "
|
||||||
echo "-------------------------------------------"
|
echo "╹ ╹┗╸┗━┛┗━╸┗━╸╹ ╹╹╹ ╹ ┗━┛┗━┛╹ ╹╹ ╹┗━╸╹ ╹╹ ╹ ╹ "
|
||||||
read -r -p "speak to the server: " text
|
echo "You may view old chat with 'scry'!"
|
||||||
makeSlug
|
echo "----------------------------------"
|
||||||
echo "${prompt}: $text" >> /srv/bunkchat.txt
|
printf "speak to the server: " >&2
|
||||||
clear
|
read -r text
|
||||||
|
makeSlug
|
||||||
|
echo "${prompt}: $text" >> $chatlog
|
||||||
|
clear
|
||||||
done
|
done
|
||||||
|
|
3
scry
3
scry
|
@ -1,3 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
chatlog=/var/log/bunkchat/chat.log
|
||||||
|
|
||||||
less /srv/bunkchat.txt
|
less $chatlog
|
||||||
|
|
Loading…
Reference in a new issue