On join

From Scriptwiki
Revision as of 09:59, 2 July 2007 by Cail (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The on JOIN event trigger when a user joins a channel.

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

Note that this event also triggers when you join a channel yourself.

Examples

on *:JOIN:#: { 
 echo -t $chan < $+ $nick $+ > has just joined $chan $+ .
}

This will echo whenever someone has joined a channel and echo it to this channel. You can use this to modify mIRC's layout.


on *:JOIN:#yourchan: {
 notice $nick Hello $nick $+ ! Enjoy your stay here in $chan $+ .
}

This will notice everyone joining #yourchan (you have to replace it with your chan of course). You can use it to have your own welcome-message.


on me:*:JOIN:#: {
 echo -s I have just joined $chan
}

The example reacts on you joining a channel. Note that it is no mistake, the prefix is "me:".

Note

The $address(nick,N) identifier gets its information from the Internal Address List (IAL). When the on JOIN event is triggered, the user joining is not yet added to the IAL unless he already was, if he/she had common channels before he/she joined. Therefore it's safe to assume that $address($nick,N) will not work in an on JOIN event. The event related identifiers $address, $fulladdress, $nick, $site, $wildsite and such do work.

on *:JOIN:#: {
  echo -ag $mask($fulladdress,2)
}

The above example would echo the same as $address($nick,2) would have done in most events.

See Also