Only report incidents when a control panel command is used

This commit is contained in:
Nick Chambers 2021-06-21 12:35:09 -05:00
parent 51c6890053
commit 8613280aa5
1 changed files with 5 additions and 2 deletions

7
rowbot
View File

@ -713,8 +713,11 @@ hook_cmd_sysroot() {
hook_cmd_control_panel() {
if [[ $from != "$owner" && $dev != yes ]]; then
privmsg "$to" "$from is not in the sudoers file. This incident will be reported."
info "security breach from %s in sector %s" "$from" "$to"
if [[ $action = @(raw|join|reload|level|dev|dev\?|trigger|cycle|dev) ]]; then
privmsg "$to" "$from is not in the sudoers file. This incident will be reported."
info "security breach from %s in sector %s" "$from" "$to"
fi
return 0
fi