Difference between revisions of "On quit"
From Scriptwiki
m |
|||
Line 25: | Line 25: | ||
== See Also == | == See Also == | ||
− | + | * [[if|if-statements]] to make more restrictions. | |
[[Category:Events]] | [[Category:Events]] |
Revision as of 09:49, 2 July 2007
The on QUIT event triggers when a user quits IRC while on the same channel as you.
on <level>:QUIT:<commands>
Read access levels to get more info about the <level> field.
The $1- parameters hold the user's quit message.
This $nick parameter holds the user's nickname.
Note that this event has no channel parameter ($chan will return $null), as you quit global, not just one channel.
Example
The following example will show howto echo a quit of a user in every common channel:
ON *:QUIT: { var %i = 1 ; loop through all channels both you and the one who quitted were in. ; $comchan() returns these common channels, with N = 0, it returns the total number of common channels. while (%i <= $comchan($nick,0)) { ; echo the quit in this channel with timestamp. echo -t $comchan($nick,1) $nick just quitted. Reason: $1- $+ . ; increase the looping-variable. inc %i } }
See Also
- if-statements to make more restrictions.