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

m (Bot: Adding a template (template:mIRC on event list))
m (Bot: Fixing links)
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.
+
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 [[$filename identifier - mIRC|$filename]] identifier with the file name attempting to be received.

Revision as of 19:07, 5 July 2014

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

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

Parameters

<level>The level for the event to trigger.

<Chat|Send|Fserve>The text that to be matched. Can also be a wildcard.

ChatTriggers if the event is caused by a DCCSERVER Chat.
SendTriggers if the event is caused by a DCCSERVER Send.
FserveTriggers if the event is caused by a DCCSERVER Fserve.

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

Examples

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

Added: mIRC v5.3

Added On: 13/12/97

See Also