ok nm.. fixed it now blush

for anyone whos interested:

Code:
ctcp *:*: {
  if  ($1-2 == dcc send) {
    if ($exists(download\ $+ $3)) { ctcp $nick DCC resume file.ext $dccportfree $file(download\ $+ $3).size | halt }
  }
}

alias dccportfree {
  var %i <first dcc port>
  while (%i <= <last dcc port>) {
    if ($portfree(%i)) { return %i }
    else inc %i
  }
}