From WikiChip
Difference between revisions of "mirc/on events/on pong"
m (→See Also) |
m (→Parameters: Link access levels) |
||
(9 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{mirc title|On Pong - Events}} | ||
The '''ON PONG''' event is triggered when the server replies with a PONG after the local mIRC client sent a [[Ping - IRC|PING]] response. | The '''ON PONG''' event is triggered when the server replies with a PONG after the local mIRC client sent a [[Ping - IRC|PING]] response. | ||
Line 5: | Line 6: | ||
== Parameters == | == Parameters == | ||
− | <span style="display: inline-block; width: 105px;">'''<level>'''</span>The | + | <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;">'''<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 15: | Line 16: | ||
haltdef | haltdef | ||
}</source> | }</source> | ||
+ | |||
+ | <source lang="mIRC"> | ||
+ | You can Trigger the ON PONG event with: | ||
+ | //raw ping $ctime X | ||
+ | |||
+ | If X is $null or $server, the displayed reply will be: | ||
+ | * PONG from YourServerName: sent_ctime_value | ||
+ | |||
+ | When the ON PONG event sees the reply, it can use $calc($ctime - $2) to find the number of seconds between PINGing the server and receiving the reply. If X is a valid Server Name different than the $server you are connected to, the reply substitutes your nick in place of the ctime value. A replacement of mIRC's display is: | ||
+ | |||
+ | on ^*:PONG:{ echo -ctgs info * PONG from $1 $+ : $2 | haltdef } | ||
+ | </source> | ||
== Compatibility == | == Compatibility == | ||
− | + | {{mIRC compatibility|5.7}} | |
− | |||
− | |||
== See Also == | == See Also == | ||
* [[On ping - mIRC|ON PING]] | * [[On ping - mIRC|ON PING]] | ||
+ | {{mIRC on event list}} | ||
− | [[Category:mIRC on events]] | + | [[Category:mIRC on events|pong]] |
Latest revision as of 07:02, 6 February 2024
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The ON PONG event is triggered when the server replies with a PONG after the local mIRC client sent a PING response.
Synopsis[edit]
ON <level>:PONG:<commands>
Parameters[edit]
<level>The corresponding access levels for the event to trigger.
<commands>The commands to be performed when the event listener's criteria is met.
Example[edit]
Halt mIRC's default display, and echo the pong message to the active window:
ON *:PONG: { echo -a Server PONG: $1- haltdef }
You can Trigger the ON PONG event with: //raw ping $ctime X If X is $null or $server, the displayed reply will be: * PONG from YourServerName: sent_ctime_value When the ON PONG event sees the reply, it can use $calc($ctime - $2) to find the number of seconds between PINGing the server and receiving the reply. If X is a valid Server Name different than the $server you are connected to, the reply substitutes your nick in place of the ctime value. A replacement of mIRC's display is: on ^*:PONG:{ echo -ctgs info * PONG from $1 $+ : $2 | haltdef }
Compatibility[edit]
Added: mIRC v5.7
Added on: 02 Feb 2000
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See Also[edit]
mIRC on event list