mIRC Homepage
Posted By: lonesome on send - 08/04/03 10:38 AM
Pardon me if this has been posted before, but i could find it. I'm trying to write a code that will be activated when I dcc send a file, however, there doesn't seem to be an on event that can identify the initiation of a send. correct me if i'm wrong, else, i think it'd be great if there was an "on send/filesend" event, which will work exactly like on chat or on filesent smile Meanwhile, does anyone knows a workabout?
Posted By: Knappen Re: on send - 08/04/03 12:44 PM
If ppl started to read the help files maybe you would have seen this:

Code:
  
on FILESENT/FILERCVD

The on FILESENT and on FILERCVD events trigger when a dcc send or dcc get succeeds.


Format:	on <level>:FILESENT:<filename[,filename]>:<commands>
Example:	on 1:FILESENT:*.txt:/msg $nick I have successfully sent you the $filename text file

The on SENDFAIL and on GETFAIL events use the same format as above, and trigger when a dcc send or dcc get fails.

Examples

on 1:FILESENT:*.txt,*.ini:/echo Sent $filename to $nick $address

This triggers when a dcc send succeeds in sending a .txt or .ini file to a user. $filename refers to the filename that was transmitted.

on 1:FILERCVD:*.txt,*.ini:/echo Received $filename from $nick | /run notepad.exe $filename

This triggers when a dcc get succeeds in getting a .txt or .ini file from a user.

on 1:SENDFAIL:*.txt:/echo I failed to send the text file $filename to $nick

This triggers when a dcc send failed to send a .txt file to a user.

on 1:GETFAIL:*.zip:/echo I failed to get the zip file $filename from $nick

This triggers when a dcc get failed to get a .zip file from a user.
Posted By: theRat Re: on send - 08/04/03 12:48 PM
just create your own /dcc alias???
Posted By: lonesome Re: on send - 08/04/03 06:04 PM
and if u started reading more carefully, u'd notice wad u said was useless. why dun u teach me how those events u copied blindly from the help file acheive my aim, which is to get my code running the moment I send a file to someone, not when the send becomes sucessful or fails? I've been scripting a time long enough to know wad's in the help file and wad's not. Maybe u'd like to read the help file more throughly again.
Posted By: lonesome Re: on send - 08/04/03 06:07 PM
i was thinking of that, but if i used alt+s to bring out the send dialog and send my file from there, would it still work? because i do not think the dialog calls the /dcc alias.. anyway, thanks for the idea. =)
© mIRC Discussion Forums