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

(Created On connect event - mIRC)
 
m (Compatibility: This was added in 5.0)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{mirc title|On Connect - Events}}
 
The '''ON CONNECT''' event triggers when mIRC has successfully connected to an IRC server and that IRC server has displayed its [[MOTD]].
 
The '''ON CONNECT''' event triggers when mIRC has successfully connected to an IRC server and that IRC server has displayed its [[MOTD]].
  
Line 5: Line 6:
  
 
== Parameters ==
 
== Parameters ==
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
+
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.
  
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
+
* '''<commands>''' - The commands to be performed when the event triggers
  
 
== Examples ==
 
== Examples ==
Line 25: Line 26:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v2.1a
+
{{mIRC compatibility|5.0}}
 
 
Added On: 28/02/95
 
  
 
== See Also ==
 
== See Also ==
 
* [[On connectfail - mIRC|ON CONNECTFAIL]]
 
* [[On connectfail - mIRC|ON CONNECTFAIL]]
 
* [[On disconnect - mIRC|ON DISCONNECT]]
 
* [[On disconnect - mIRC|ON DISCONNECT]]
* [[$network identifier - mIRC|$network]]
+
* {{mIRC|$network}}
* [[$server identifier - mIRC|$server]]
+
* {{mIRC|$server}}
 +
{{mIRC on event list}}
  
[[Category:mIRC on events]]
+
[[Category:mIRC on events|connect]]

Latest revision as of 07:56, 15 February 2024

The ON CONNECT event triggers when mIRC has successfully connected to an IRC server and that IRC server has displayed its MOTD.

Synopsis[edit]

ON <level>:CONNECT:<commands>

Parameters[edit]

  • <level> - The corresponding access levels for the event to trigger.
  • <commands> - The commands to be performed when the event triggers

Examples[edit]

; Echo the server and network
; names to the active window
ON *:CONNECT:echo -a Server: $server -- Network: $network

If a successful connection is made to an IRC server, the above code will display something similar to the below example:

Server: chicago.il.us.undernet.org -- Network: UnderNet
; Join a single channel,
; #myChannel, upon successful connection
 
ON *:CONNECT:join #myChannel

When a successful connection is made to a server, mIRC will now join the channel #myChannel.

Compatibility[edit]

Added: mIRC v5.0
Added on: 02 Apr 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]