From WikiChip
Difference between revisions of "mirc/on events/on join"
< mirc‎ | on events

m (Examples)
m (Examples)
Line 15: Line 15:
 
== Examples ==
 
== Examples ==
 
Once the local mIRC client has joined a channel, echo to the channel window the total users inside of the channel:
 
Once the local mIRC client has joined a channel, echo to the channel window the total users inside of the channel:
<source lang="mIRC">ON ME:*:JOIN:#:echo -a Total Users: $nick(#,0)</source>
+
<source lang="mIRC">ON ME:*:JOIN:#:echo # Total Users: $nick(#,0)</source>
  
 
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 13:07, 25 June 2014

The ON JOIN event triggers when the mIRC client, or a remote user, joins a channel.

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.

[,#]Specific channel names

<commands>The commands to be performed when the event listener's criteria is met.

Examples

Once the local mIRC client has joined a channel, echo to the channel window the total users inside of the channel:

ON ME:*:JOIN:#:echo # Total Users: $nick(#,0)

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/02/95

See Also