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

m (Bot: Fixing compatibility)
m (Parameters: Link access levels)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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.
+
{{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 {{mIRC|/fserve}} window.
  
This event fills the '''[[$cd identifier - mIRC|$cd identifier]]''' with the current folder that the user is in within the [[/fserve command - mIRC|FSERVE]].
+
This event fills the '''[[$cd identifier - mIRC|$cd identifier]]''' with the current folder that the user is in within the {{mIRC|/fserve}} command.
  
 
== Synopsis ==
 
== Synopsis ==
Line 7: Line 8:
  
 
== 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;">'''<matchtext>'''</span>The text that to be matched. Much like the [[On text - mIRC|ON TEXT]] event, this can be any combination of text letters, numbers, and [[wildcards]].
+
<span style="display: inline-block; width: 105px;">'''<matchtext>'''</span>The text that to be matched. Much like the [[On text - mIRC|ON TEXT]] event, this can be any combination of text letters, numbers, and {{mIRC|wildcard}}s.
  
 
<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 34: Line 35:
 
{{mIRC on event list}}
 
{{mIRC on event list}}
  
[[Category:MIRC on events]]
+
[[Category:mIRC on events|serv]]

Latest revision as of 08:04, 6 February 2024

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 command.

Synopsis[edit]

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

Parameters[edit]

<level>The corresponding access levels 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[edit]

; 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[edit]

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[edit]