Properly ignore nolog requests
This commit is contained in:
parent
965c117935
commit
3e26238d1c
1 changed files with 12 additions and 0 deletions
12
rowbot
12
rowbot
|
@ -660,6 +660,18 @@ who() {
|
||||||
# app hooks
|
# 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() {
|
hook_pre_PRIVMSG_CTCP() {
|
||||||
if [[ ${args[1]} != $'\x01'*$'\x01' ]]; then
|
if [[ ${args[1]} != $'\x01'*$'\x01' ]]; then
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in a new issue