On kick: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Doomie (talk | contribs)
No edit summary
 
Doomie (talk | contribs)
added links
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|$+]] .
   }
   }
  }
  }

Revision as of 14:50, 22 November 2005

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

Take a look at the On ban event if you want to react on bans. Thus the On unban event reacts on unbans.