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

(Created On serv event - mIRC)
 
m (Bot: adding missing title)
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{mirc title|On Serv - Events}}
 
The '''ON SERV''' event, much like the [[On chat - mIRC|ON CHAT]] event, is triggered when a message is sent via an [[/fserve command - mIRC|FSERVE]] window.
 
The '''ON SERV''' event, much like the [[On chat - mIRC|ON CHAT]] event, is triggered when a message is sent via an [[/fserve command - mIRC|FSERVE]] window.
  
Line 19: Line 20:
 
ON *:SERV:!time:msg =$nick The current time is: hh:nntt</source>
 
ON *:SERV:!time:msg =$nick The current time is: hh:nntt</source>
  
In the above example, the '''msg''' is not simply followed by the '''[[$nick identifier - mIRC|$nick]]''' identifier. Instead, the [[=$nick identifier - mIRC|=$nick]] identifier has been used. This special identifier tells mIRC that the event should not simply send a private message to the user, but rather it should message the user's DCC Chat window, if there is one.
+
In the above example, the '''msg''' is not simply followed by the '''{{mIRC|$nick}}''' identifier. Instead, the {{mIRC|=$nick}} identifier has been used. This special identifier tells mIRC that the event should not simply send a private message to the user, but rather it should message the user's DCC Chat window, if there is one.
  
 
The next example will send the user the current folder they are in if they type '''!folder''':
 
The next example will send the user the current folder they are in if they type '''!folder''':
Line 26: Line 27:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v3.8
+
{{mIRC compatibility|3.8}}
 
 
Added On: 25/11/95
 
  
 
== See Also ==
 
== See Also ==
* [[$cd identifier - mIRC|$cd]]
+
* {{mIRC|$cd}}
 
* [[On chat - mIRC|ON CHAT]]
 
* [[On chat - mIRC|ON CHAT]]
 
* [[On text - mIRC|ON TEXT]]
 
* [[On text - mIRC|ON TEXT]]
 +
{{mIRC on event list}}
  
[[Category:mIRC on events]]
+
[[Category:mIRC on events|serv]]

Revision as of 20:22, 15 June 2017

The ON SERV event, much like the ON CHAT event, is triggered when a message is sent via an FSERVE window.

This event fills the $cd identifier with the current folder that the user is in within the FSERVE.

Synopsis

ON <level>:SERV:<matchtext>:<commands>

Parameters

<level>The level for the event to trigger.

<matchtext>The text that to be matched. Much like the ON TEXT event, this can be any combination of text letters, numbers, and wildcards.

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

Examples

; This event waits for any user on a DCC Chat to use the
; command !time and then relays back to them the current time
 
ON *:SERV:!time:msg =$nick The current time is: hh:nntt

In the above example, the msg is not simply followed by the $nick identifier. Instead, the [[mirc/{{{1}}}#|{{{1}}}]] identifier has been used. This special identifier tells mIRC that the event should not simply send a private message to the user, but rather it should message the user's DCC Chat window, if there is one.

The next example will send the user the current folder they are in if they type !folder:

; Listen for !folder on the SERV event
ON *:SERV:!folder:msg =$nick Current Folder: $cd

Compatibility

Added: mIRC v3.8
Added on: 25 Nov 1995
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also