Properly ignore nolog requests

This commit is contained in:
Nick Chambers 2021-06-23 11:40:48 -05:00
parent d9cb21377e
commit bafccdb8af
1 changed files with 12 additions and 0 deletions

12
rowbot
View File

@ -660,6 +660,18 @@ who() {
# app hooks
##
hook_pre_PRIVMSG_nolog() {
local words
read -ra words <<< "${args[@]:(-1)}"
if [[ ${words[0]} = "[nolog]" || ${words[0]} = nolog: ]]; then
info "this message was redacted"
return 1
else
return 0
fi
}
hook_pre_PRIVMSG_CTCP() {
if [[ ${args[1]} != $'\x01'*$'\x01' ]]; then
return 0