downloadmod() {
  mkdir -p "/path/to/modules/$1"
  cd "/path/to/modules/$1"
  grep -i "\\\\$1\\\\" /path/to/allmods.txt | sed "s/[0-9]\+\\t\\\\\(.*$1\)\\\\.*/\1/gi" | sed "s/\\\\/\\//gi" | uniq | while read -r line; do echo $line; wget -nd -c -r -nv --limit-rate=8000 "ftp://ftp.modland.com/pub/modules/$line/"; done
}

