title: TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'
body: <p>I'm getting that strange TypeError when trying to get user's Hostname.</p>
  
  <pre><code>def getHostName(tfm, username):
      found = False
      for room in tfm.rooms.values():
              for playerCode, client in room.clients.items():
                      if client.username == username:
                              found = socket.gethostbyaddr(socket.gethostname())[0]
                              break
      return found
  </code></pre>
  
  <p>This is what I used to get Hostname, and that's what it's erroring.</p>
  
  <pre><code>def getIPaddress(tfm, username):
      found = False
      for room in tfm.rooms.values():
              for playerCode, client in room.clients.items():
                      if client.username == username:
                              found = client.address[0]
                              break
      return found
  </code></pre>
  
  <p>This is what I used to get IP Address, successfully.</p>
  
  <pre><code>Traceback (most recent call last):
    File "Wesley.py", line 544, in found_terminator
      tfm.parsePacket(packet, MDT, Size)
    File "Wesley.py", line 760, in parsePacket
      tfm.parseDataUTF(packet[2:struct.unpack('!h', packet[:2])[0]+2])
    File "Wesley.py", line 1063, in parseDataUTF
      Commands(tfm, values[0], values)
    File "/root/Server/Commands.py", line 2543, in ParseCommand
      hostname = tfm.server.getHostName(username)
    File "Wesley.py", line 5757, in getHostName
      found = socket.gethostbyaddr(socket.gethostname())[0]
  TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'
  </code></pre>
  
  <p>I used a command to specify the username.</p>