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

(Created On logon event - mIRC)
 
m (Parameters: Link access levels)
 
(18 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 +
{{mirc title|On Logon - Events}}
 
The '''ON LOGON''' event triggers immediately after mIRC has begun connection to a server, and has sent the standard [[Pass - IRC|PASS]], [[Nick - IRC|NICK]], and [[User - IRC|USER]] information to the server.
 
The '''ON LOGON''' event triggers immediately after mIRC has begun connection to a server, and has sent the standard [[Pass - IRC|PASS]], [[Nick - IRC|NICK]], and [[User - IRC|USER]] information to the server.
  
'''Note:''' This event can be prefixed with the '''^''' character to cause the event to trigger ''before'' the [[Pass - IRC|PASS]], [[Nick - IRC|NICK]], and [[User - IRC|USER]] information is sent to the server. Utilizing this '''^''' character, the events can even be [[/halt command - mIRC|halted]], and no information sent to the server; this will most-likely cause a connection interruption, or disconnection entirely.
+
'''Note:''' This event can be prefixed with the '''^''' character to cause the event to trigger ''before'' the [[Pass - IRC|PASS]], [[Nick - IRC|NICK]], and [[User - IRC|USER]] information is sent to the server. Utilizing this '''^''' character, the events can even be {{mIRC|/halt}}ed, and no information sent to the server; this will most-likely cause a connection interruption, or disconnection entirely.
  
 
== Synopsis ==
 
== Synopsis ==
<pre>ON <level>:LOGON:*:<commands></pre>
+
<source lang="mIRC">
 +
on <level>:logon:<servername>:<commands>
 +
</source>
  
 
== Parameters ==
 
== Parameters ==
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
+
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger.
 +
 
 +
<span style="display: inline-block; width: 105px;">'''<servername>'''</span>this parameter is based on the network name. If a network name cannot be found, it uses the group name, and if that cannot be found, it uses the server address as a last resort. Can be a {{mirc|wildcard}}. The order is important, for example if you use an ip address for this parameter and connect the first time, it will trigger, but mIRC will associate a network value and the network will be used next time, which wouldn't match the ip address, you can use * for this parameter and handle {{mIRC|$servertarget}} to tie the event to a specific server target value.
  
 
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
 
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
Line 13: Line 18:
 
== Examples ==
 
== Examples ==
 
Echo to the active window some information before the login information is sent, using the '''^''' prefix:
 
Echo to the active window some information before the login information is sent, using the '''^''' prefix:
<source lang="mIRC">ON ^*:LOGON:echo -a Connecting to $server through the $network network...</source>
+
<source lang="mIRC">on ^*:logon:*:echo -a Connecting to $server through the $network network...</source>
  
 
Create a popup window which shows up after a successful connection is established:
 
Create a popup window which shows up after a successful connection is established:
<source lang="mIRC">ON ^*:LOGON:noop $input(Successfully connected to: $server $+ !,io,Connection Successful)</source>
+
<source lang="mIRC">on ^*:logon:*:noop $input(Successfully connected to: $server $+ !,io,Connection Successful)</source>
  
 
The event above will generate a popup-window much like the one in the screenshot below:
 
The event above will generate a popup-window much like the one in the screenshot below:
Line 23: Line 28:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v6.03
+
{{mIRC compatibility|6.03}}
 
 
Added On: 16/08/2002
 
  
 
== See Also ==
 
== See Also ==
Line 31: Line 34:
 
* [[On disconnect - mIRC|ON DISCONNECT]]
 
* [[On disconnect - mIRC|ON DISCONNECT]]
 
* [[On quit - mIRC|ON QUIT]]
 
* [[On quit - mIRC|ON QUIT]]
* [[/disconnect command - mIRC|/disconnect]]
+
* {{mIRC|/disconnect}}
* [[/quit command - mIRC|/quit]]
+
* {{mIRC|/quit}}
* [[/server command - mIRC|/server]]
+
* {{mIRC|/server}}
 +
{{mIRC on event list}}
  
[[Category:mIRC on events]]
+
[[Category:mIRC on events|logon]]

Latest revision as of 07:49, 6 February 2024

The ON LOGON event triggers immediately after mIRC has begun connection to a server, and has sent the standard PASS, NICK, and USER information to the server.

Note: This event can be prefixed with the ^ character to cause the event to trigger before the PASS, NICK, and USER information is sent to the server. Utilizing this ^ character, the events can even be /halted, and no information sent to the server; this will most-likely cause a connection interruption, or disconnection entirely.

Synopsis[edit]

on <level>:logon:<servername>:<commands>

Parameters[edit]

<level>The corresponding access levels for the event to trigger.

<servername>this parameter is based on the network name. If a network name cannot be found, it uses the group name, and if that cannot be found, it uses the server address as a last resort. Can be a wildcard. The order is important, for example if you use an ip address for this parameter and connect the first time, it will trigger, but mIRC will associate a network value and the network will be used next time, which wouldn't match the ip address, you can use * for this parameter and handle $servertarget to tie the event to a specific server target value.

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

Examples[edit]

Echo to the active window some information before the login information is sent, using the ^ prefix:

on ^*:logon:*:echo -a Connecting to $server through the $network network...

Create a popup window which shows up after a successful connection is established:

on ^*:logon:*:noop $input(Successfully connected to: $server $+ !,io,Connection Successful)

The event above will generate a popup-window much like the one in the screenshot below:

Displays a screenshot for the Onlogon event example.

Compatibility[edit]

Added: mIRC v6.03
Added on: 16 Aug 2002
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]