Improve lore tracking
This commit is contained in:
parent
2d8bb0c8de
commit
63a62cedd2
2 changed files with 7 additions and 5 deletions
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -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
9
rowbot
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue