mIRC Home    About    Download    Register    News    Help

Print Thread
#127405 13/08/05 10:07 AM
Joined: Apr 2005
Posts: 2
T
tactix Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
T
Joined: Apr 2005
Posts: 2
Code:
 on *:sockread:dccget*: {
  sockread &dccget
  :dccget
  if ($sockerr) { echo #root Sock Error $sockerr }
  if ($sockbr == 0) { sockwrite -n $sockname $lf ? | return }
  bwrite $gettok($hget($sockname,file),1,32) -1 -1 &dccget
  echo #root   sockwrite -n $sockname sent packet $sock($sockname).rcvd
  sockread &dccget
  goto dccget
} 
I am trying to make my socket dcc get, it will only download part of the file and i believe its because mirc sends something back to the sending user when the $sockbr is at 0 I was just wondering what that was or if anyone knows how to make this work!

Mod note: Moved -> Script questions are better asked in 'Scripts and Popups'.

Last edited by Mentality; 13/08/05 10:47 AM.
#127406 13/08/05 11:42 AM
Joined: Aug 2005
Posts: 128
S
Vogon poet
Offline
Vogon poet
S
Joined: Aug 2005
Posts: 128
I don't know the protocol of the DCC sockets, but I don't think you have to send any '?'... Try:
Code:
on *:sockread:dccget*: {

  sockread &dccget

  :dccget {

    if ($sockerr) { echo #root Sock Error $sockerr }

    if ($sockbr == 0) { sockclose $sockname | halt }

    bwrite $gettok($hget($sockname,file),1,32) -1 -1 &dccget

    echo -a $sock($sockname).rcvd bytes recieved

    sockread &dccget

  }

  goto dccget

} 

#127407 13/08/05 11:59 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
A start would be to search and read the DCC specification, like for example this one. Search google for DCC specification or DCC rfc. Then you can start implementing it...


Link Copied to Clipboard