summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2018-09-01 04:49:22 +0000
committerbill-auger <mr.j.spam.me@gmail.com>2018-09-28 23:30:25 -0400
commit7d6673533834d6e8bac5b7f99e0c44657169cb71 (patch)
tree5631fd158cd17ee61787d040e4f3741af80da86c
parent7652409698a535acea66a74ef31c88e200ba4a0c (diff)
fix missing 'announcements/*/you_have_mail' error in memo reminder
-rw-r--r--lib/main.sh2
-rw-r--r--process_event1
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/main.sh b/lib/main.sh
index 7bb7041..fccec5b 100644
--- a/lib/main.sh
+++ b/lib/main.sh
@@ -547,7 +547,7 @@ while true; do
# Make sure they have not already been
# told they have a message less than 1
# hour ago
- if [[ -f "announcements/people/${personoslashlower}/seen" ]] && (( ( $( stat -c %Y "announcements/people/${personoslashlower}/you_have_mail" ) + 3600 ) > the_time_now ))
+ if [[ -f "announcements/people/${personoslashlower}/seen" ]] && (( ( $( stat -c %Y "announcements/people/${personoslashlower}/you_have_mail" 2> /dev/null ) + 3600 ) > the_time_now ))
then
yepyep=0
fi
diff --git a/process_event b/process_event
index 9e67fd4..adff835 100644
--- a/process_event
+++ b/process_event
@@ -233,6 +233,7 @@ function process_event
send_msg "${channel_it_came_from}" "${personoslash}: ${sender_u} told me to tell you, (${units} ago): ${message_u}"
done
rm "announcements/people/${personoslashlower}/messages"
+ rm "announcements/people/${personoslashlower}/you_have_mail" 2> /dev/null || true
fi