Site Tools


on_mode

Differences

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

Link to this comparison view

on_mode [2006/08/29 16:08] (current)
Line 1: Line 1:
 +======Synopsis:​======
 +[[on]] [<​modes>​]mode [<​serial#>​] [-|^]<​match>​ { <​action>​ }
 +
 +======Description:​======
 +This hook is triggered whenever the client observes a mode change on a
 +channel, or whenever the client changes its modes.
 +
 +======Parameters:​======
 +|$0    |nickname of person issuing mode change |
 +|$1    |channel or nickname affected by mode change |
 +|$2    |modes changed |
 +|$3-   ​|arguments to modes (if any) |
 +
 +======Examples:​======
 +To distinguish between user modes and channel modes:
 +   on ^mode "​*"​ {
 +      if ( [$1] == N ) {
 +         xecho -b User mode change for $1: $2-
 +      } {
 +         xecho -b Mode change for $1 by $0: $2-
 +      }
 +   }
 +
  
on_mode.txt ยท Last modified: 2006/08/29 16:08 (external edit)