heres some help on your problem with spaces.
If the filename has spaces in it it well look like this

DCC SEND "file name with spaces.txt" <ip> <port> <filesize>

The reciever is ment to reply for resume with

DCC RESUME file.ext <port> <position>

the file.ext is exactly that " f i l e . e x t " this is what the mirc help says. So i guess its really only something mirc is doing, which would explain why mirc dont like "" it thinks thats no file at all.

From the Mirc help....
Note: The newer versions of mIRC actually ignore the filename as it is redundant since the port uniquely identifies the connection. However, to remain compatible with older mIRC's, mIRC still sends a filename as file.ext in both RESUME and ACCEPT.

I would try this out
Code:
 
ctcp *:DCC SEND *:*: {
  if ($exists($filename)) {
    ;below line can be removed if you like, i dont like resuming if i have the same amount of file or more
    if ($file($filename).size &gt;= $gettok($1-,-1,32)) { HALT }
    var %resumepos = $calc($file($filename).size - 8192)
    if (%resumepos &lt; 0) { var %resumepos = 0 }
    .msg $nick DCC RESUME file.ext $gettok($1-,-2,32) %resumepos $+ 
  }
}
 


I believe as long as there is some filename in the resume it would work, but u may well be right that you need the correct filename when dealing with some other irc clients.