Code:
alias allow { 
  if (!$isid) {
    if ($1 == -a) { hadd -m allow $2 $2 } 
    if ($1 == -d) {
      if ($hget(allow,$2)) { hdel allow $2 }
    }
    elseif ($1 == -c) { 
      if ($hget(allow)) { .hfree allow }
    }
  }
  else { return $hget(allow,$1) }
}
on $^*:open:?:/(?:ftp:\/\/|https?:\/\/|www2?\.)[^<>\.\s]+(?:\.[^<>\.\s]+)+(?:\/[^<>\.\s]+)*|irc:\/\/[^<>\.\s]+(?:\.[^/<>\.\s]+)+(?:\/[^/<>\.\s]*)?\/?(?![^\s\x2c\.])|aim:goim\?screenname=[^\s&]+(?:&message=[^\s&=]+)?/:{ 
  if ($allow($nick) == $null) { halt }
}
on *:start:{
  if (!$hget(allow)) { 
    if ($isfile($scriptdirallow.hsh)) { hload allow " $+ $scriptdirallow.hsh" }
  }
}
on *:exit:{
  if ($hget(allow)) { hsave -o allow " $+ $scriptdirallow.hsh" }
}


The above will block pm's that have ftp, http(s), www(2), irc, or aim urls in them, there is also an allow list so that you can let some people send you urls.

/allow -a <nick> - add a nick to the allow list.
/allow -d <nick> - remove a nick from the allow list.
/allow -c - clear the allow list.

- Not tested.