This shows you the differences between two versions of the page.
— |
on_part [2006/08/26 04:03] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: on_part.txt,v 1.1 2006/08/26 04:03:56 sthalik Exp $ | ||
+ | |||
+ | ======Synopsis:====== | ||
+ | [[on]] [<modes>]part [<serial#>] [-|^]<match> { <action> } | ||
+ | |||
+ | ======Description:====== | ||
+ | This hook is triggered whenever a client (the user's or any other) is | ||
+ | observed leaving a channel (but not signing off from irc). | ||
+ | |||
+ | ======Parameters:====== | ||
+ | | $0 | the nickname of the person leaving the channel | | ||
+ | | $1 | the channel left by the person | | ||
+ | | $2 | the userhost of the person leaving the channel | | ||
+ | | $3- | the reason the channel is left (on servers that support reasons) | | ||
+ | |||
+ | ======Examples:====== | ||
+ | To distinguish the client from other users leaving a channel: | ||
+ | on ^part "*" { | ||
+ | if ( [$0] == N ) { | ||
+ | xecho -b You have left channel $1 ${[$3] ? [\($3-\)] : []} | ||
+ | } { | ||
+ | xecho -b $0 \($2\) has left channel $1 ${[$3] ? [\($3-\)] : []} | ||
+ | } | ||
+ | } | ||
+ | |||