ctcp *:DCC SEND*:?:{
[color:#006600];
; Someone is sending you a file.
;[/color]
var %FileName = $gettok($3-,$+(1-,$calc($numtok($3-,32) - 3)),32)
var %LongIP = $gettok($3-,-3,32)
var %Port = $gettok($3-,-2,32)
var %FileSize = $gettok($3-,-1,32)
echo $color(ctcp) -sti2 * Incoming DCC Send Request from $nick $+ : $&
%FileName from IP $longip(%LongIp) on port %Port $&
with a filesize of $bytes(%FileSize,3bkm).suf
[color:#006600];
; In reverse order:
; Cancel button: closes the Accept/Ignore/Cancel dialog
; Ignore button: /ignore -du60 $wildsite
; Accept button:
; checks to see if %FileName exists in the Get directory for that file type
; and offers the opportunity to Resume / Overwrite / Rename.
;[/color]
if ($isfile($+($getdir(%FileName),%FileName))) {
[color:#006600];
; Your code for intercepting the Resume request and perhaps renaming the old file
; would go in here.
;[/color]
echo $color(info) -sti2 * %FileName exists in $getdir(%FileName) - $&
preparing to popup the Resume/Overwrite/Rename dialog if the Accept button is clicked.
}
}
ctcp *:DCC RESUME*:?:{
[color:#006600];
; You are sending a file to someone and they have clicked the RESUME button.
;[/color]
echo $color(ctcp) -sti2 * Receiver has requested a DCC RESUME. $+([,$1-,])
}
ctcp *:DCC ACCEPT*:?:{
[color:#006600];
; You have clicked the RESUME button and the file transfer is being resumed.
;[/color]
echo $color(ctcp) -sti2 * RESUMING DCC Send request. $+([,$1-,])
}