on [<modes>]set [<serial#>] [-|^]<match> { <action> }
This hook is triggered whenever a /set is issued.
$0 | name of variable to be set. will be “set-error” if an invalid SET variable was specified |
$1- | value the variable will be set to. will be “No such variable “FOO””, where FOO is the invalid SET variable if $0 is “set-error” |
To make sure set security stays on:
on ^set "security %" { xecho -b You cannot set SECURITY off! set exec_protection 7 }
To warn of all invalid /SET attempts:
on ^set "set-error *" { xecho -b $1-. Please try again }