diff options
author | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-25 07:22:11 +0100 |
---|---|---|
committer | Joseph Graham <joseph@fibreglass.tunachunks> | 2013-08-25 07:22:11 +0100 |
commit | c8ddb52e73d439d9853c2613f9354b7daf5a51ce (patch) | |
tree | 4d2cef78f739ed699e9630212d102e53553695ef /hack_of_all_hacks | |
parent | fd15a1a92161a30ad49ee01d47673dd7d74a9a0a (diff) |
make him respond to private messages
Diffstat (limited to 'hack_of_all_hacks')
-rw-r--r-- | hack_of_all_hacks | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hack_of_all_hacks b/hack_of_all_hacks index 54d19d1..77672ac 100644 --- a/hack_of_all_hacks +++ b/hack_of_all_hacks @@ -36,13 +36,16 @@ function l33t_codes { my_own_name='pbot' - channel_it_came_from="$( echo ${line} | cut -d ' ' -f 3 )" - person="${sender%%!*}" # Remove any forward slashes. personoslash="${person//\/}" + channel_it_came_from="$( echo ${line} | cut -d ' ' -f 3 )" + + # If it's a private message + [[ "${channel_it_came_from}" == "${my_own_name}" ]] && channel_it_came_from="personoslash" + ###################### # Echo injected data # ###################### |