diff --git a/happybot/rmlog.sh b/happybot/rmlog.sh new file mode 100644 index 0000000..7252221 --- /dev/null +++ b/happybot/rmlog.sh @@ -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;