proc test_telnet {} {
  if {[catch {set tnsock [socket -async eggdrop/ip eggdrop/port]} sockerr]} {
    puts "Try again later, look out the window till then!"
    close $tnsock
    return 0
  }
  puts $tnsock "handle\npass"
  flush $tnsock
  set tnout [gets $tnsock]
  puts $tnout
}