summaryrefslogtreecommitdiff
path: root/hack_of_all_hacks
diff options
context:
space:
mode:
Diffstat (limited to 'hack_of_all_hacks')
-rw-r--r--hack_of_all_hacks20
1 files changed, 0 insertions, 20 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks
index 2020021..2a31a4c 100644
--- a/hack_of_all_hacks
+++ b/hack_of_all_hacks
@@ -119,30 +119,10 @@ function l33t_codes
if ! [[ -d "announcements/people/${personoslashlower}" ]]
then
mkdir -p "announcements/people/${personoslashlower}"
- touch "announcements/people/${personoslashlower}/phrases"
- cat << EOF > "announcements/people/${personoslashlower}/settings"
-enabled=yes
-locked=no
-EOF
fi
the_time_now=$(date +%s)
- # If this person has announcements enabled and there is at least one
- # phrase in their file and their seen log exists.
- if grep 'enabled=yes' "announcements/people/${personoslashlower}/settings" > \
- /dev/null && (( $( wc -l "announcements/people/${personoslashlower}/phrases" | cut -d ' ' -f 1 ) )) && [[ -f "announcements/people/${personoslashlower}/seen" ]]
- then
- # Check if they were last present more than three hours ago.
- if (( ( $( stat -c %Y "announcements/people/${personoslashlower}/seen" ) +
- 10800 ) < the_time_now ))
- then
- send_msg "${channel_it_came_from}" \
- "$( shuf "announcements/people/${personoslashlower}/phrases" | head -1 )"
- fi
-
- fi
-
# If someone has sent this person a message then echo it to
# them.
if [[ -f "announcements/people/${personoslashlower}/messages" ]]