summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Graham <joseph@fibreglass.tunachunks>2014-07-02 08:58:21 +0100
committerJoseph Graham <joseph@fibreglass.tunachunks>2014-07-02 08:58:21 +0100
commitaa16e5554ebef645fbceefc4b20d8dfb3923e926 (patch)
tree4455b82c4f45f92e54808b01b3c5145c257838ab
parent1aee8e7fa935eef50101d2280a96425a9d179eeb (diff)
fixed bug
-rw-r--r--lib/main.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/main.sh b/lib/main.sh
index 1710198..4fc1adf 100644
--- a/lib/main.sh
+++ b/lib/main.sh
@@ -548,18 +548,19 @@ l33t_codes
# Remove any forward slashes.
personoslash="${person//\/}"
+ declare -l personoslashlower="${personoslash}"
the_time_now=$(date +%s)
# If someone has sent this person a message then tell them.
- if [[ -f "announcements/people/${personoslash}/messages" ]]
+ if [[ -f "announcements/people/${personoslashlower}/messages" ]]
then
yepyep=1
# Make sure they have not already been
# told they have a message less than 1
# hour ago
- if [[ -f announcements/people/${personoslash}/seen ]] && (( ( $( stat -c %Y announcements/people/${personoslash}/you_have_mail ) + 3600 ) > the_time_now ))
+ if [[ -f "announcements/people/${personoslashlower}/seen" ]] && (( ( $( stat -c %Y "announcements/people/${personoslashlower}/you_have_mail" ) + 3600 ) > the_time_now ))
then
yepyep=0
fi
@@ -572,7 +573,7 @@ l33t_codes
else
send_msg "${channel}" "${personoslash}: you have a message, type something to see it."
fi
- touch "announcements/people/${personoslash}/you_have_mail"
+ touch "announcements/people/${personoslashlower}/you_have_mail"
fi
fi