diff options
author | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-16 15:18:33 +0100 |
---|---|---|
committer | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-16 15:18:33 +0100 |
commit | 85aea9644a758725d5138441d6293b76812815d2 (patch) | |
tree | 587d5e7a0b4ce8c6205b625d2900b72c031c6728 | |
parent | f8011798a5f0b16728dc980b19dbed99fcf93f47 (diff) |
Fixed a bug in the code that sais when someone was last seen. It wasn't handling years correctly.
-rw-r--r-- | hack_of_all_hacks | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks index a4d0312..6e30fc6 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -193,7 +193,7 @@ EOF hours_ago_seen="$(( ( the_time_now - $( stat -c %Y announcements/people/${subject}/seen ) ) / 3600 ))" days_ago_seen="$(( ( the_time_now - $( stat -c %Y announcements/people/${subject}/seen ) ) / 86400 ))" months_ago_seen="$(( ( the_time_now - $( stat -c %Y announcements/people/${subject}/seen ) ) / 2592000 ))" - years_ago_seen="$(( ( the_time_now - $( stat -c %Y announcements/people/${subject}/seen ) ) / 946080000 ))" + years_ago_seen="$(( ( the_time_now - $( stat -c %Y announcements/people/${subject}/seen ) ) / 31104000 ))" if (( seconds_ago_seen < 120 )) then send_msg "${channel_it_came_from}" "I last saw ${subject} speak ${seconds_ago_seen} seconds ago." |