summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Graham <joseph@fibreglass.tunachunks>2013-08-27 22:19:30 +0100
committerJoseph Graham <joseph@fibreglass.tunachunks>2013-08-27 22:19:30 +0100
commit947ec8b92431279c8cbe48ce5bdd2981fc5aa271 (patch)
treefed92c42cb386154dcc2bd6b1411c17418479aab
parent97aedfcb035e4b578263d235a99718f71f73c047 (diff)
Improved how the case insensitivity works
-rw-r--r--hack_of_all_hacks9
1 files changed, 5 insertions, 4 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks
index e16ac47..b73dcb1 100644
--- a/hack_of_all_hacks
+++ b/hack_of_all_hacks
@@ -10,14 +10,15 @@ function rdom
function tell_fact # thing channel
{
thing="${1}"
+ declare -l lower_case_thing="${thing}"
channel="${2}"
- if [[ -s "info/${thing}" ]]
+ if [[ -s "info/${lower_case_thing}" ]]
then
# For the first entry we will say like: `thing is: '
first="${thing} is: "
- uniq "info/${thing}" |
+ uniq "info/${lower_case_thing}" |
while read line
do
send_msg "${channel}" "${first}${line}"
@@ -302,7 +303,7 @@ EOF
fi
;;
','+([![:space:]]) )
- declare -l thing="${sentence#,}"
+ thing="${sentence#,}"
tell_fact "${thing}" "${channel_it_came_from}"
;;
@@ -335,7 +336,7 @@ EOF
dudep1="${gotit#,tell }"
dude="${dudep1%% *}"
- declare -l thing="${gotit##* }"
+ thing="${gotit##* }"
if [[ -n "${dude}" ]] && [[ -n "${thing}" ]]
then