Difference between revisions of "On part"

From Scriptwiki
Jump to: navigation, search
 
m
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
  on <level>:PART:<#[,#]>:<commands>
 
  on <level>:PART:<#[,#]>:<commands>
  
The part message is saved in $1-.
+
The part message is saved in [[$1-]].
  
 
'''Note''' that this event also triggers when you part a channel.
 
'''Note''' that this event also triggers when you part a channel.
Line 8: Line 8:
 
== Example ==
 
== Example ==
 
  on *:PART:#: {  
 
  on *:PART:#: {  
   [[echo]] [[$chan]] [[$nick]] has just parted $chan (reason: $1- $+ ).  
+
   [[echo]] [[$chan]] [[$nick]] has just parted $chan (reason: [[$iif]]($1-,$1-,None) $+ ).  
 
  }
 
  }
 
This example reacts on every part in a channel you are in and echos it to this channel.
 
This example reacts on every part in a channel you are in and echos it to this channel.
Line 19: Line 19:
  
 
== See Also ==
 
== See Also ==
To react on joins, take a look at the [[On_join|On join event]].
+
* [[On_join|On join event]] is triggered when someone joins a channel.
 
+
* [[On_quit|On quit event]] is triggered when someone quits IRC.
The [[On_quit|On quit event]] is triggered when someone quits IRC.
 
  
 
[[Category:Events]]
 
[[Category:Events]]

Latest revision as of 09:52, 2 July 2007

The on PART events trigger when a user parts a channel.

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

The part message is saved in $1-.

Note that this event also triggers when you part a channel.

Example

on *:PART:#: { 
 echo $chan $nick has just parted $chan (reason: $iif($1-,$1-,None) $+ ). 
}

This example reacts on every part in a channel you are in and echos it to this channel.


on me:*:PART:#: {
 echo -s I have just parted $chan 
}

This example will react on you parting a channel and echo it to your Status Window. Note that is no mistake, the prefix is "me:".

See Also