proc checklist {nick uhost hand chan args} {
set arg [split $arg]
   set ftplist [lindex $arg 0]
   putserv "PRIVMSG $chan :running ftpcheck on $ftplist"
   foreach line $file {
   set ftpurl [lindex $line 0]
   set ftphost [lindex $ftpurl 0]
   set ftpport [lindex $ftpurl 1]
   set ftpuser [lindex $ftpurl 2]
   set ftppass [lindex $ftpurl 3]
   if {[FTP::Open $ftphost $ftpport $ftpuser $ftppass]} {
   putserv "PRIVMSG $chan :Connection Successful! (ftp://$ftpuser:$ftppass@$ftphost:$ftpport)"
        set f [open ftpcheck.alive.txt w]
        puts $f "$ftphost $ftpport $ftpuser $ftppass"
        puts $f ""
        close $f
	} {
putserv "PRIVMSG $chan :Connection refused! (ftp://$ftpuser:$ftppass@$ftphost:$ftpport) (Invalid Password Or User Or dead)"
        set f [open ftpcheck.dead.txt w]
        puts $f "$ftphost $ftpport $ftpuser $ftppass"
        puts $f ""
        close $f
	}
   FTP::Close
   }
   }