This commit is contained in:
zgrep 2018-08-23 17:05:42 -04:00
parent 1d7dbc4dbe
commit 55889129a7
1 changed files with 11 additions and 0 deletions

11
happybot/rmlog.sh Normal file
View File

@ -0,0 +1,11 @@
#!/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;