summaryrefslogtreecommitdiff
path: root/hack_of_all_hacks
diff options
context:
space:
mode:
authorJoe <joe@joelightning.com>2011-11-19 12:47:24 +0000
committerJoe <joe@joelightning.com>2011-11-19 12:47:24 +0000
commit92700331909ee5e33c7878eb83ba0d55cf27c7a7 (patch)
treeb8261a5ab51ea7283ba8c9d0c51bd865aead7d7a /hack_of_all_hacks
parent94faf759991e25d904b0778813ba572faa666897 (diff)
make it only recomend someone to the bug tracker once per day
Diffstat (limited to 'hack_of_all_hacks')
-rw-r--r--hack_of_all_hacks19
1 files changed, 18 insertions, 1 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks
index 8c240d6..9e5eacb 100644
--- a/hack_of_all_hacks
+++ b/hack_of_all_hacks
@@ -19,9 +19,26 @@ function l33t_codes
# Shared libraries error #
##########################
+ the_time_now=$(date +%s)
+
+ # If someone complains about error while loading shared libraries error
+ # then recomend them to the bug tracker.
if [[ ${line} == *"error while loading shared libraries"* ]]
then
- send_msg "${channel_it_came_from}" "${person}: please report a bug, specifying exact error message, package of the failing command and architecture"
+ yepyep=1
+
+ # Make sure they have not already been recommended to the bug tracker
+ # less than one day ago.
+ if [[ -f announcements/people/${personoslash}/seen ]] && (( ( $( stat -c %Y announcements/people/${personoslash}/shared_libs ) + 86400 ) > the_time_now ))
+ then
+ yepyep=0
+ fi
+
+ if (( yepyep ))
+ then
+ send_msg "${channel_it_came_from}" "${person}: please report a bug, specifying exact error message, package of the failing command and architecture"
+ touch "announcements/people/${personoslash}/shared_libs"
+ fi
fi
##########