aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.sh
diff options
context:
space:
mode:
authorMárcio Silva <coadde at hyperbola dot info>2017-06-04 12:03:11 -0300
committerMárcio Silva <coadde at hyperbola dot info>2017-06-04 12:03:11 -0300
commit5ac26dc8291c8d4c3d5d033c5ad22bb54ea8e3a9 (patch)
treeb389be3eb21e367823deb1f8e9c98fe9fcac71e8 /lib/main.sh
parent7eb1df0ef4ccc5bc3e9c5a74dea6a5b796cc3cb4 (diff)
downloadhyperbot-5ac26dc8291c8d4c3d5d033c5ad22bb54ea8e3a9.tar.lz
hyperbot-5ac26dc8291c8d4c3d5d033c5ad22bb54ea8e3a9.tar.xz
hyperbot-5ac26dc8291c8d4c3d5d033c5ad22bb54ea8e3a9.zip
Update lib/main.sh and process_event from pbot-ng, remove issue_tracker_change_detector, to fix hyperbot vunerability
Diffstat (limited to 'lib/main.sh')
-rw-r--r--lib/main.sh35
1 files changed, 11 insertions, 24 deletions
diff --git a/lib/main.sh b/lib/main.sh
index 1473edf..183ce8f 100644
--- a/lib/main.sh
+++ b/lib/main.sh
@@ -439,32 +439,19 @@ while true; do
# Check if there is a command.
commands_call_command "$sender" "$target" "$query"
-################################################################################
-################################################################################
+ # What happens next is important
+ config_update_time=-100
-# Hack of all hacks!!!
+ time_n0w=$( date +%s )
-# if [[ "${identified}" != yep ]]
-# then
-# send_msg "NickServ" "identify csukwHrqH9"
-# identified=yep
-# fi
-
-config_update_time=-100
-
-time_n0w=$( date +%s )
-
-# If it's been more than a minute since we updated the config.
-if (( ( time_n0w - 60 ) > config_update_time ))
-then
- source hack_of_all_hacks
- config_update_time=${time_n0w}
-fi
-
-l33t_codes
+ # If it's been more than a minute since we updated the config.
+ if (( ( time_n0w - 60 ) > config_update_time ))
+ then
+ source process_event
+ config_update_time=${time_n0w}
+ fi
-################################################################################
-################################################################################
+ process_event
# Check return code
case $? in
@@ -566,7 +553,7 @@ l33t_codes
if (( yepyep ))
then
- if (( $(wc -l hack_of_all_hacks | cut -d ' ' -f 1) > 1 ))
+ if (( $(wc -l "announcements/people/${personoslashlower}/messages" | cut -d ' ' -f 1) > 1 ))
then
send_msg "${channel}" "${personoslash}: you have messages, type something to see them."
else