Properly ignore nolog requests
This commit is contained in:
parent
d9cb21377e
commit
bafccdb8af
12
rowbot
12
rowbot
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue