mIRC Home    About    Download    Register    News    Help

Print Thread
on send #18501 08/04/03 10:38 AM
Joined: Dec 2002
Posts: 62
lonesome Offline OP
Babel fish
OP Offline
Babel fish
Joined: Dec 2002
Posts: 62
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?

Re: on send #18502 08/04/03 12:44 PM
Joined: Jan 2003
Posts: 148
K
Knappen Offline
Vogon poet
Offline
Vogon poet
K
Joined: Jan 2003
Posts: 148
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.

Re: on send #18503 08/04/03 12:48 PM
Joined: Dec 2002
Posts: 774
T
theRat Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
just create your own /dcc alias???


Code:
//if ( khaled isgod ) echo yes | else echo no
Re: on send #18504 08/04/03 06:04 PM
Joined: Dec 2002
Posts: 62
lonesome Offline OP
Babel fish
OP Offline
Babel fish
Joined: Dec 2002
Posts: 62
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.

Re: on send #18505 08/04/03 06:07 PM
Joined: Dec 2002
Posts: 62
lonesome Offline OP
Babel fish
OP Offline
Babel fish
Joined: Dec 2002
Posts: 62
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. =)