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

m (PatrolBot moved page On ping - mIRC to mirc/on events/on ping: per new naming convention)
m (minor add'l info)
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''ON PING''' event is triggered when the server sends you a [[Ping - IRC|PING]] to see if you are still connected.
+
{{mirc title|On Ping - Events}}
 +
The '''ON PING''' event is triggered when the server sends you a [[Ping - IRC|PING]] to see if you are still connected. The ON PING event does not trigger if mIRC's option is checked "'''Hide ping! pong! event'''"
  
 
== Synopsis ==
 
== Synopsis ==
Line 15: Line 16:
 
   haltdef
 
   haltdef
 
}</source>
 
}</source>
 +
 +
You can mimic mIRC's default display with:
 +
<source lang="mIRC">ON ^*:PING:{ echo -ctgs info2 Ping? Pong! | haltdef }</source>
  
 
== Compatibility ==
 
== Compatibility ==
Line 23: Line 27:
 
{{mIRC on event list}}
 
{{mIRC on event list}}
  
[[Category:MIRC on events|ping]]
+
[[Category:mIRC on events|ping]]

Revision as of 01:08, 28 November 2017

The ON PING event is triggered when the server sends you a PING to see if you are still connected. The ON PING event does not trigger if mIRC's option is checked "Hide ping! pong! event"

Synopsis

ON <level>:PING:<commands>

Parameters

<level>The level for the event to trigger.

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

Example

Halt mIRC's default display, and echo the ping message to the active window:

ON *:PING: {
  echo -a Server PING: $1-
  haltdef
}

You can mimic mIRC's default display with:

ON ^*:PING:{ echo -ctgs info2 Ping? Pong! | haltdef }

Compatibility

Added: mIRC v5.6
Added on: 03 Jun 1999
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also