This is an example code of the !commands ON/OFF

Code:
ON *:TEXT:!commands *:#: {
  if ($2 == ON) {
    if (!%commands) { set %commands 1 | .msg $chan ( $+ $nick $+ ): All the text commands have been enabled! }
    elseif (%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already enabled! }
  }
  if ($2 == OFF) {
    if (%commands) { unset %commands | .msg $chan ( $+ $nick $+ ): All the text commands have been disabled! }
    elseif (!%commands) { .msg $chan ( $+ $nick $+ ): The text commansd are already disabled! }
  }
}