mIRC Home    About    Download    Register    News    Help

Print Thread
#172056 04/03/07 11:16 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
I cant figure this one out. What I am trying to make is a script that will msg a person saying what it is that i am sending. I am going to be send txt files so I am msging the person with the file name and $lines of the file. THe thing is i cant figure out what to use to trigger the msg when a dcc send starts. I have tried on *:open: with no luck. Any help whould be great, or to point me in the right direction.
Thanks

truguce #172108 05/03/07 05:31 PM
Joined: Jun 2003
Posts: 994
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Jun 2003
Posts: 994
how are you initiating the send? manually? by script responding to an event (on text, for example)?


I refuse to engage in a battle of wits with an unarmed person. wink
truguce #172162 06/03/07 03:49 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Code:
on *:DCCSERVER:SEND:{
msg $nick I am sending you $+($filename,.)
play $nick textfile
}


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
CtrlAltDel #172277 08/03/07 08:39 AM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
it is done by me doing /dccsend nick then selecting the file. I tried the on :dccserver: but i think that is for when someone sends to you. The only thing i can come up with is to use a timer but i dont like that option.

truguce #172281 08/03/07 10:41 AM
Joined: Jul 2006
Posts: 107
L
Vogon poet
Offline
Vogon poet
L
Joined: Jul 2006
Posts: 107
May as well alias yourself out of this one smile

This will do what you want, once you edit TEXTDIR to point to your uh text file directory.
Code:
alias dcsnd {
  set -u0 %sendme $qt($$sfile($mircdirTEXTDIR*.txt,DCC $1,Send))
  set -u0 %fyle $nopath(%sendme)
  set -u0 %lines $lines(%sendme)
  notice $1 I am sending you %fyle $+ , Total $+(Lines,$chr(58)) %lines
  dcc send $1 %sendme
}
Usage: /dcsnd <nick>

Note that the select file dialog is not as pretty as the one you get directly with the dcc send command,
and doesn't have the DCC-specific options either.

I used /notice just because I prefer it. /msg either throws up a window with focus (most irritating),
or it sends it minimized to taskbar and I don't see it.
Notices on the other hand are shown in my active window, leaving only the DCC Get dialog to click on.

Last edited by LonDart; 08/03/07 10:47 AM.

LonDart

Link Copied to Clipboard