12 lines
343 B
Bash
12 lines
343 B
Bash
#!/usr/bin/env ash
|
|
|
|
. /home/zgrep/offtopiabday/happybot/common.sh
|
|
|
|
irc | while read -r n m; do
|
|
m="$(var "$m" | tr 'A-Z' 'a-z')"
|
|
if reg '^((happy|hate)bot[:,]? ?)(rm|destroy|boom|wipe) ?(the)? ?logs?$' "$m"; then
|
|
echo -n '' > '/home/zgrep/offtopiabday/irc.freenode.net/'"$chan"'/out'
|
|
echo 'Logs have been wiped.' | zwsp | say;
|
|
fi;
|
|
done;
|