diff options
author | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-26 11:50:05 +0100 |
---|---|---|
committer | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-26 11:50:05 +0100 |
commit | 819b58bcb42e47056057c659c07e67ac6219fcec (patch) | |
tree | 7aaece6689057de569e3d34b447ad4fac50cfebf /hack_of_all_hacks | |
parent | a30157fd6818398c77e1fc22fde5b4a5213fe7c4 (diff) |
Made the stuff pbot remembers be case-insensitive
Diffstat (limited to 'hack_of_all_hacks')
-rw-r--r-- | hack_of_all_hacks | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks index b6cca3e..0e13c8e 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -257,7 +257,7 @@ EOF send_msg "${channel_it_came_from}" "${personoslash}: ${response}" ;; "${my_own_name}: "+([![:space:]])" is "+([![:space:]])* ) - thing="${sentence#${my_own_name}: }" + declare -l thing="${sentence#${my_own_name}: }" thing="${thing%% is *}" is="${sentence#* is }" @@ -265,7 +265,7 @@ EOF send_msg "${channel_it_came_from}" "${personoslash}: Remembered." ;; "${my_own_name}: "+([![:space:]])" is: "+([![:space:]])* ) - thing="${sentence#${my_own_name}: }" + declare -l thing="${sentence#${my_own_name}: }" thing="${thing%% is: *}" is="${sentence#* is: }" @@ -273,7 +273,7 @@ EOF send_msg "${channel_it_came_from}" "${personoslash}: Remembered." ;; "${my_own_name}: "+([![:space:]])" isn't "+([![:space:]])* ) - thing="${sentence#${my_own_name}: }" + declare -l thing="${sentence#${my_own_name}: }" thing="${thing%% isn\'t *}" isnt="${sentence#* isn\'t }" @@ -289,7 +289,7 @@ EOF fi ;; "${my_own_name}: "+([![:space:]])" isn't: "+([![:space:]])* ) - thing="${sentence#${my_own_name}: }" + declare -l thing="${sentence#${my_own_name}: }" thing="${thing%% isn\'t: *}" isnt="${sentence#* isn\'t: }" @@ -302,7 +302,9 @@ EOF fi ;; ','+([![:space:]]) ) - tell_fact "${sentence#,}" "${channel_it_came_from}" + declare -l thing="${sentence#,}" + + tell_fact "${thing}" "${channel_it_came_from}" ;; ${my_own_name}:* ) while read line @@ -333,7 +335,7 @@ EOF dudep1="${gotit#,tell }" dude="${dudep1%% *}" - thing="${gotit##* }" + declare -l thing="${gotit##* }" if [[ -n "${dude}" ]] && [[ -n "${thing}" ]] then |