Site Tools


on_set

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

on_set [2006/08/29 20:18] (current)
Line 1: Line 1:
 +======Synopsis:​======
 +[[on]] [<​modes>​]set [<​serial#>​] [-|^]<​match>​ { <​action>​ }
 +
 +======Description:​======
 +This hook is triggered whenever a /[[set]] is issued.
 +
 +======Parameters:​======
 +|$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" ​ |
 +
 +======Examples:​======
 +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
 +   }
 +
  
on_set.txt ยท Last modified: 2006/08/29 20:18 (external edit)