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]
A on Action, on Active, on Agent, on Appactive B on Ban C on Char, on Chat, on Chatclose, on Chatopen, on Close, on Connect, on Connectfail, on Ctcpreply D on Dccserver, on Dehelp, on Deop, on Deowner, on Devoice, on Dialog, on Disconnect, on Dns |
J on Join K on Keydown, on Keyup, on Kick M on Midiend, on Mode, on Mp3end |
Q on Queryclose, on Queryopen, on Quit S on Sendfail, on Serv, on Servclose, on Servermode, on Serverop, on Servopen, on Signal, on Snotice, on Sockclose, on Socklisten, on Sockopen, on Sockread, on Sockwrite, on Start U on Udpread, on Udpwrite, on Unban, on Unload, on Unotify, on Usermode |