mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
that deal with dcc?



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
What exactly are you trying to accomplish with DCC? You need to specify so that someone can help ya out.

Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
hey sorry. I have this script:

on SENDFAIL:*.*: {
echo @ExPeDiTiOn -DCCSend of $filename to $nick 4FAILED 1on $asctime(hh:nn:ss:tt) | set %sendfail $calc(%sendfail + 1)
}
on GETFAIL:*.*: {
echo @ExPeDiTiOn -DCCGet of $filename from $nick 4FAILED 1on $asctime(hh:nn:ss:tt) | set %getfail $calc(%getfail + 1)
}
on *:FILESENT:*.*: {
echo @ExPeDiTiOn -DCCSend of $filename to $nick 12COMPLETE 1on $asctime(hh:nn:ss:tt) | set %sendcomplete $calc(%sendcomplete + 1)
}
on *:FILERCVD:*.*: {
echo @ExPeDiTiOn -DCCGet of $filename from $nick 12COMPLETE 1on $asctime(hh:nn:ss:tt) | set %getcomplete $calc(%getcomplete + 1)
}

but i want it to echo when a send is tryed to start, but cant connect, i was wondering if there is a on *:ERROR:*cannot connect*: handel or something that tells me when it dosnt even start. Or one that says send times out.



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
something like this:

on 1*:ERROR:*cannot connect*:/echo Connection could not be made. Try again!


Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
ya, but that does not work



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
On Error responds only to server error messages, not to DCC errors.

There are already On Sendfail and On Getfail events, which trigger whether a DCC send/get fails. and nope, it doesn't tell exactly what happened.

By the way, the correct form is:

On *:sendfail:filename match:{ commands }
On *:getfail:filename match:{ commands }

And not as used above.

Good night smile

Joined: Dec 2002
Posts: 1,237
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
hmm lets see have you tried on 1:CONNECTFAIL: instead of Error?

and or what online has said?

Last edited by The_Game; 24/01/03 12:07 AM.
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
I will try on *:CONNECTFAIL:

and if you read my code, I already have what online suggested



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
o, oops. didnt see the *:, ok ill try that too



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
ok thanks guys it works. Onlines idea that is. How can i say the speed it completed at?



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
You mean, how much time did the transfer take?

Here's an example script:
Code:
ctcp *:dcc send *:?:{
  hadd -m dccspeed $gettok($1-,-1,32) $ctime
}
On *:filercvd:*:{
  if $hget(dccspeed,$file($filename).size) {
    echo -s * File $nopath($filename) received in $duration($calc($ctime - $ifmatch))
    hdel dccspeed $file($filename).size
  }
}

It calculates the time past since the DCC transfer started until its completion.

Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
what about the speed it completed at, or the avg download speed of the transfer?



;Check for Life

if (%life == $null) {
goto getlife
}
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
$send(nick).cps for sends
or
$get(nick).cps for downloads

you can use $bytes($send/get(nick).cps).suf for a readable result.

Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
now where you have nick , do i leave it like that? or is that $nick?



;Check for Life

if (%life == $null) {
goto getlife
}

Link Copied to Clipboard