More code cleanup, including removing lines of code that as far as I can tell did absolutely nothing. Watch for breakage.
This commit is contained in:
parent
5984a2dbb2
commit
c6a8d0ce12
25
bot.sh
25
bot.sh
@ -114,31 +114,6 @@ tail -f "$input" | telnet "$server" "$port" | while read -r result ; do
|
|||||||
./triggers/keywords/keywords.sh "$who" "$from" "$result"
|
./triggers/keywords/keywords.sh "$who" "$from" "$result"
|
||||||
set +f
|
set +f
|
||||||
fi
|
fi
|
||||||
# "#" would mean it's a channel
|
|
||||||
if [ "$(echo "$from" | grep '#')" ]; then
|
|
||||||
[[ "$(echo "$result" | grep ":$nick:")" ]] || continue
|
|
||||||
will="${result#*#*:}"
|
|
||||||
will="${will#*:}"
|
|
||||||
else
|
|
||||||
will="${result:1}"
|
|
||||||
will="${will#* :}"
|
|
||||||
from="$who"
|
|
||||||
fi
|
|
||||||
# Had to turn on globbing to remove all leading whitespace, then turn it off again afterwards.
|
|
||||||
shopt -s extglob
|
|
||||||
will="${will##*( )}"
|
|
||||||
shopt -u extglob
|
|
||||||
command="${will%% *}"
|
|
||||||
will="${will#* }"
|
|
||||||
if [ -z "$(ls modules/ | grep -i -- "$command")" ] || [ -z "$command" ]; then
|
|
||||||
set -f
|
|
||||||
./modules/help/help.sh "$who" "$from"
|
|
||||||
set +f
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
set -f
|
|
||||||
./modules/$command/$command.sh "$who" "$from" $will
|
|
||||||
set +f
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "$result" >> "$log"
|
echo "$result" >> "$log"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user