(Added more examples) |
(→Examples) |
||
Line 26: | Line 26: | ||
Who ever joins, send them a greeting: | Who ever joins, send them a greeting: | ||
<source lang="mIRC">ON *:JOIN:#:msg # Welcome to # $+ , $nick $+ !</source> | <source lang="mIRC">ON *:JOIN:#:msg # Welcome to # $+ , $nick $+ !</source> | ||
+ | |||
+ | Override the join event to print a custom text and then tell mIRC to ignore it's own text. | ||
+ | <source lang="mIRC"> | ||
+ | on ^*:JOIN:*:{ | ||
+ | echo -tcbf join $chan * $nick ( $+ $fulladdress $+ ) join $chan | ||
+ | halt | ||
+ | } | ||
+ | </source> | ||
== Compatibility == | == Compatibility == |
Revision as of 16:13, 27 April 2023
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; if you want to undertake some processing once the channel user list is complete, then use RAW 366 which indicates the end of the user list. Similarly, if you're an operator on the channel, you won't be opped inside the on join event, and should use ON OP event instead.
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 following example makes use of the ON ME event, which triggers only when the local mIRC client triggers the event, not remote users.
ON ME:*:JOIN:#testing: { msg $chan Hello $chan - Today is $day and time is $time }
The following example works for everyone else who joins but except your self.
ON !*:JOIN:#mychan: { msg $chan Hey $nick $+ ! Welcome in our channel. }
Who ever joins, send them a greeting:
ON *:JOIN:#:msg # Welcome to # $+ , $nick $+ !
Override the join event to print a custom text and then tell mIRC to ignore it's own text.
on ^*:JOIN:*:{ echo -tcbf join $chan * $nick ( $+ $fulladdress $+ ) join $chan halt }
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.