raisedragon / pircbotx

Automatically exported from code.google.com/p/pircbotx
0 stars 0 forks source link

In the user object, it should also include the user's ip #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
your storing the hostname already might as well as store the ip

Original issue reported on code.google.com by italian...@gmail.com on 3 Feb 2012 at 7:31

GoogleCodeExporter commented 9 years ago
Can't, there are many times where the hostname is wrong (hostname masking, tor, 
etc). This makes any bot dependent on the IP address unreliable. If you really 
need the IP information, try InetAddress.getByName(user.getHostmask());

Also keep in mind that the server is the only one that knows the users true IP 
address. If you ban/exempt/etc a user by hostmask, the server will convert that 
into an IP address.

Original comment by Lord.Qua...@gmail.com on 3 Feb 2012 at 2:14