Improve lore tracking

This commit is contained in:
Nick Chambers 2021-07-03 17:11:50 -05:00
parent da3c5cdfe7
commit a42e273453
2 changed files with 7 additions and 5 deletions

View File

@ -17,4 +17,5 @@ jobs:
- name: Upload release package
run: |
GITHUB_TOKEN=$ROWBOT_RELEASE_TOKEN hub release create -a "$RUNNER_TEMP"/rowbot-"${GITHUB_REF##*/}".tar.gz -m "Rowbot ${GITHUB_REF##*/}" "${GITHUB_REF##*/}"
export GITHUB_TOKEN=$ROWBOT_RELEASE_TOKEN
hub release create -a "$RUNNER_TEMP"/rowbot-"${GITHUB_REF##*/}".tar.gz -F release.txt "${GITHUB_REF##*/}"

9
rowbot
View File

@ -13,8 +13,6 @@ fi
if [[ ! -v LORE_LONGEST_LIFE ]]; then
export LORE_LONGEST_LIFE=0
elif (( LORE_LONGEST_LIFE < SECONDS )); then
export LORE_LONGEST_LIFE=$SECONDS
fi
if [[ -v LORE_LIVES ]]; then
@ -1059,7 +1057,6 @@ hook_cmd_control_panel() {
privmsg "$to" "sent message to $recipient"
;;
dashboard|lore)
declare -p LORE_LONGEST_LIFE
privmsg "$to" "legend began on $(printf '%(%c)T' "$LORE_START_TIME")"
privmsg "$to" "this life began on $(printf '%(%c)T' "$LORE_THIS_RELOAD")"
@ -1069,7 +1066,11 @@ hook_cmd_control_panel() {
privmsg "$to" "longest life so far is $(seconds "$SECONDS") (this one)"
fi
privmsg "$to" "lived $LORE_LIVES times"
if (( LORE_LIVES > 1 )); then
privmsg "$to" "lived $LORE_LIVES times"
else
privmsg "$to" "lived $LORE_LIVES time"
fi
esac
}