Difference between revisions of "On kick"

From Scriptwiki
Jump to: navigation, search
 
m
 
(One intermediate revision by one other user not shown)
Line 8: Line 8:
 
== Example ==
 
== Example ==
 
  on *:KICK:#: {
 
  on *:KICK:#: {
   if ($knick == $me) {
+
   [[if]] ($knick == $me) {
   [[echo]] -s You have been kicked out of $chan [[DollarPlus|$+]] .
+
   [[echo]] -s You have been kicked out of [[$chan]] [[DollarPlus|$+]] .
 
   }
 
   }
 
  }
 
  }
Line 15: Line 15:
  
 
== See Also ==
 
== See Also ==
Take a look at the [[On_ban|On ban event]] if you want to react on bans. Thus the [[On_unban|On unban event]] reacts on unbans.
+
* [[On_ban|On ban event]] if you want to react on bans.  
 +
* [[On_unban|On unban event]] reacts on unbans.
  
 
[[Category:Events]]
 
[[Category:Events]]

Latest revision as of 09:53, 2 July 2007

The on KICK event triggers when a user is kicked from a channel.

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

$knick is the nick that was kicked and $nick the nick that has kicked.

Note that if you want to rejoin automatically after a kick, you can turn this on in the mIRC options dialog. But remember that you normally haven't been kicked without reason and many people don't like autorejoin. Additionally, there is a mIRC option to keep channel windows open (when kicked).

Example

on *:KICK:#: {
 if ($knick == $me) {
  echo -s You have been kicked out of $chan $+ .
 }
}

This example would trigger when you have been kicked out of a channe and echo it to your Status Window.

See Also