title: socket.gaierror: [Errno 11003] getaddrinfo failed
body: <pre><code> if data.find('!scan') != -1:
   nick = data.split('!')[ 0 ].replace(':','')
   targetip = socket.gethostbyname(str(arg))
   sck.send('PRIVMSG ' + chan + " :" ' scanning host' + targetip + '\r\n')
   for i in range(20, 1025):
       s = socket(AF_INET, SOCK_STREAM)
       result = s.connect_ex((targetip, i))
       if (result == 0) :
            s.send('PRIVMSG ' + chan + " :" 'port %d: OPEN' % (i,) + '\r\n')
       s.close()
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>    targetip = socket.gethostbyname(str(arg))
  socket.gaierror: [Errno 11003] getaddrinfo failed
  </code></pre>