aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/main.sh2
-rw-r--r--process_event16
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/main.sh b/lib/main.sh
index 50040d6..7b421f8 100644
--- a/lib/main.sh
+++ b/lib/main.sh
@@ -550,7 +550,7 @@ while true; do
then
yepyep=0
fi
-
+
if (( yepyep ))
then
if (( $(wc -l "announcements/people/${personoslashlower}/messages" | cut -d ' ' -f 1) > 1 ))
diff --git a/process_event b/process_event
index 379a8b2..ce14963 100644
--- a/process_event
+++ b/process_event
@@ -113,7 +113,7 @@ function process_event
sentence="${line#* }"
sentence="${sentence#* }"
sentence="${sentence#* :}"
-
+
##########################
# Shared libraries error #
##########################
@@ -180,7 +180,7 @@ function process_event
sender_u="${intermediate%% *}"
message_u="${intermediate#* }"
time_sent="${line%% *}"
-
+
seconds_ago_seen="$(( the_time_now - time_sent ))"
minutes_ago_seen="$(( ( the_time_now - time_sent ) / 60 ))"
hours_ago_seen="$(( ( the_time_now - time_sent ) / 3600 ))"
@@ -210,7 +210,7 @@ function process_event
done
rm "announcements/people/${personoslashlower}/messages"
fi
-
+
#####################
# Page title getter #
#####################
@@ -220,7 +220,7 @@ function process_event
(( ! injected_data ))
then
url_to_get="${BASH_REMATCH}"
-
+
the_title=$(
curl -L --compressed "${url_to_get}" 2> /dev/null |
while rdom
@@ -231,7 +231,7 @@ function process_event
fi
done
)
-
+
if ! [[ -z ${the_title} ]]
then
send_msg "${channel_it_came_from}" "Page title: \`${the_title}'"
@@ -300,7 +300,7 @@ function process_event
send_msg "${channel_it_came_from}" "${my_own_name}: ${personoslash} told me to tell you, (0 seconds ago): ${message}"
else
declare -l subjectlower="${subject}"
-
+
[[ -d "announcements/people/${subjectlower}" ]] || mkdir -p "announcements/people/${subjectlower}"
# The time in *nix seconds is saved there so that
# hyperbot can say how long ago the massage was sent
@@ -381,7 +381,7 @@ function process_event
#############
# Footnotes #
#############
-
+
*\[[[:digit:]]\]* )
declare -a fn
@@ -405,7 +405,7 @@ function process_event
str="${fn[${n}]}"
[[ -z "${str}" ]] && continue
-
+
send_msg "${channel_it_came_from}" "[${n}] ${str}"
done
;;