Line 1: | Line 1: | ||
{{mirc title|On Join - Events}} | {{mirc title|On Join - Events}} | ||
The '''ON JOIN''' event triggers when the mIRC client, or a remote user, joins a channel. | The '''ON JOIN''' event triggers when the mIRC client, or a remote user, joins a channel. | ||
+ | |||
+ | '''Note''': When you join a channel yourself, $nick($chan,0) is always 1 inside the on join event because mIRC has to send /names to get the nickname; the same way, if you're an operator on the channel, you won't be opped inside the on join event. | ||
== Synopsis == | == Synopsis == | ||
Line 15: | Line 17: | ||
== Examples == | == Examples == | ||
− | |||
− | |||
The above example makes use of the [[on me - mIRC|ON ME]] event, which triggers only when the local mIRC client triggers the event, not remote users. | The above example makes use of the [[on me - mIRC|ON ME]] event, which triggers only when the local mIRC client triggers the event, not remote users. |
Revision as of 19:01, 31 October 2018
The ON JOIN event triggers when the mIRC client, or a remote user, joins a channel.
Note: When you join a channel yourself, $nick($chan,0) is always 1 inside the on join event because mIRC has to send /names to get the nickname; the same way, if you're an operator on the channel, you won't be opped inside the on join event.
Synopsis
ON <level>:JOIN:<#[,#]>:<commands>
Parameters
<level>The level for the event to trigger.
<#,[,#]>The text that to be matched. Can also be a wildcard.
<commands>The commands to be performed when the event listener's criteria is met.
Examples
The above example makes use of the ON ME event, which triggers only when the local mIRC client triggers the event, not remote users.
When a user joins, send them a greeting:
ON *:JOIN:#:msg # Welcome to # $+ , $nick $+ !
Compatibility
Added: mIRC v2.1a
Added on: 28 Feb 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.