on MODE

The on MODE event triggers when a user changes a channel mode.

Format:

on <level>:MODE:<#[,#]>:<commands>

Example:

on 1:MODE:#mIRC:/notice $me $nick changed $chan mode to $1-

The on SERVERMODE event uses the same format, and triggers when an IRC Server changes a channel mode.

Examples

on @1:MODE:#:/notice $me $nick changed $chan mode to $1-

This triggers when a user changes a mode on any channel where you have Ops (the @ sign specifies the Op requirement, see the Access Levels section for more info). The actual parameters of the mode change are stored in $1- which you would need to parse yourself to enforce a particular mode.

Note: These events only trigger on channel mode changes not user mode changes such as ops, bans, etc.