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

(Created On dccserver event - mIRC)
 
m (Bot: adding missing title)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
The '''ON DCCSERVER''' event triggers a connection attempt is made on mIRC's DCC Server. This event allows easy monitoring of connections and the ability to prevent someone from connecting to mIRC by invoking the [[/halt command - mIRC|/halt]] command.
+
{{mirc title|On Dccserver - Events}}
 +
The '''ON DCCSERVER''' event triggers a connection attempt is made on mIRC's DCC Server. This event allows easy monitoring of connections and the ability to prevent someone from connecting to mIRC by invoking the {{mIRC|/halt}} command.
  
When triggered by a '''Send''', this event fills the [[$filename identifier - mIRC|$filename]] identifier with the file name attempting to be received.
+
When triggered by a '''Send''', this event fills the {{mIRC|$filename}} identifier with the file name attempting to be received.
  
 
== Synopsis ==
 
== Synopsis ==
Line 7: Line 8:
  
 
== Parameters ==
 
== Parameters ==
<span style="display: inline-block; width: 145px;">'''<level>'''</span>The level for the event to trigger.
+
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.s
  
<span style="display: inline-block; width: 145px;">'''<Chat|Send|Fserve>'''</span>The text that to be matched. Can also be a [[wildcard]].
+
* '''<Chat|Send|Fserve>''' - The text that to be matched. Can also be a {{mIRC|wildcard}}.
  
<div style="background-color: rgba(0,0,0,.03); display: block;"><span style="display: inline-block; margin-left: 145px; width: 65px;">'''Chat'''</span>Triggers if the event is caused by a DCCSERVER Chat.</div>
+
** '''Chat''' - Triggers if the event is caused by a DCCSERVER Chat.
 
+
** '''Send''' - Triggers if the event is caused by a DCCSERVER Send.
<div style="background-color: rgba(0,0,0,.06); display: block;"><span style="display: inline-block; margin-left: 145px; width: 65px;">'''Send'''</span>Triggers if the event is caused by a DCCSERVER Send.</div>
+
** '''Fserve''' - Triggers if the event is caused by a DCCSERVER Fserve.
 
+
* '''<commands>''' - The commands to be performed when the event listener's criteria is met.
<div style="background-color: rgba(0,0,0,.03); display: block;"><span style="display: inline-block; margin-left: 145px; width: 65px;">'''Fserve'''</span>Triggers if the event is caused by a DCCSERVER Fserve.</div>
 
 
 
<span style="display: inline-block; width: 145px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
 
  
 
== Examples ==
 
== Examples ==
Echo to the active screen some information when a [[Dcc send - mIRC|DCC Send]] is being received:
+
Echo to the active screen some information when a {{mIRC|/dcc|dcc send}} is being received:
 
<source lang="mIRC">ON *:DCCSERVER:Send:echo User $nick ( $+ $address $+ ) is attempting to send: $filename</source>
 
<source lang="mIRC">ON *:DCCSERVER:Send:echo User $nick ( $+ $address $+ ) is attempting to send: $filename</source>
  
The '''ON DCCSERVER''' event can also prevent certain events from happening, based on a certain criteria. For instance, the following event will decline a [[Dcc send - mIRC|DCC Send]] if the file extension is [[.exe file type - Windows|.exe]]:
+
The '''ON DCCSERVER''' event can also prevent certain events from happening, based on a certain criteria. For instance, the following event will decline a {{mIRC|/dcc|dcc send}} if the file extension is [[.exe file type - Windows|.exe]]:
<source lang="mIRC">ON *:DCCSERVER:Send:if ($right($filename,4) == .exe) { halt }</source>
+
<source lang="mIRC">ON *:DCCSERVER:Send:if ($right($filename,4) == .exe) { echo -a User $nick just tried to send a file with an .exe extension. It has been declined. | halt }</source>
  
The use of the [[/halt command - mIRC|halt command]] in this instance prevents any further action, even from any confirmation windows from popping up. The [[/halt command - mIRC|halt command]] can also be used on the other '''ON DCCSERVER''' events to prevent anything from happening.
+
The use of the {{mIRC|/halt}} command in this instance prevents any further action, even from any confirmation windows from popping up. /halt can also be used on the other '''ON DCCSERVER''' events to prevent anything from happening.
  
Echo when a user attempts to initiate a [[Dcc chat - mIRC|DCC Chat]]:
+
Echo when a user attempts to initiate a {{mIRC|/dcc|DCC Chat}}:
<source lang="mIRC">ON *:DCCSERVER:Chat:echo User $nick ( $+ $address $+ ) is attempting to initiate a DCC Chat</source>
+
<source lang="mIRC">ON *:DCCSERVER:Chat:echo User $nick ( $+ $address $+ ) is attempting to initiate a DCC Chat.</source>
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v5.3
+
{{mIRC compatibility|5.3}}
 
 
Added On: 13/12/97
 
  
 
== See Also ==
 
== See Also ==
 
* [[On chat - mIRC|ON CHAT]]
 
* [[On chat - mIRC|ON CHAT]]
 
* [[On sendfail - mIRC|ON SENDFAIL]]
 
* [[On sendfail - mIRC|ON SENDFAIL]]
 +
{{mIRC on event list}}
  
[[Category:mIRC on events]]
+
[[Category:mIRC on events|dccserver]]

Latest revision as of 19:13, 15 June 2017

The ON DCCSERVER event triggers a connection attempt is made on mIRC's DCC Server. This event allows easy monitoring of connections and the ability to prevent someone from connecting to mIRC by invoking the /halt command.

When triggered by a Send, this event fills the $filename identifier with the file name attempting to be received.

Synopsis[edit]

ON <level>:DCCSERVER:<Chat|Send|Fserve>:<commands>

Parameters[edit]

  • <level> - The corresponding access levels for the event to trigger.s
  • <Chat|Send|Fserve> - The text that to be matched. Can also be a wildcard.
    • Chat - Triggers if the event is caused by a DCCSERVER Chat.
    • Send - Triggers if the event is caused by a DCCSERVER Send.
    • Fserve - Triggers if the event is caused by a DCCSERVER Fserve.
  • <commands> - The commands to be performed when the event listener's criteria is met.

Examples[edit]

Echo to the active screen some information when a dcc send is being received:

ON *:DCCSERVER:Send:echo User $nick ( $+ $address $+ ) is attempting to send: $filename

The ON DCCSERVER event can also prevent certain events from happening, based on a certain criteria. For instance, the following event will decline a dcc send if the file extension is .exe:

ON *:DCCSERVER:Send:if ($right($filename,4) == .exe) { echo -a User $nick just tried to send a file with an .exe extension. It has been declined. | halt }

The use of the /halt command in this instance prevents any further action, even from any confirmation windows from popping up. /halt can also be used on the other ON DCCSERVER events to prevent anything from happening.

Echo when a user attempts to initiate a DCC Chat:

ON *:DCCSERVER:Chat:echo User $nick ( $+ $address $+ ) is attempting to initiate a DCC Chat.

Compatibility[edit]

Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]