Find the IP of other people in IRC channels, mIRC script

You can, on IRC, see which IP belongs to a user (whatever you need to know this for, obviously . This is achieved, inside mIRC, with the /dns command. So, for example, if you want to know what IP is using your channelmate Jogi you can do:

/dns Jogi

and you will see, after some time, the IP and the IP name (if there is one) of Jogi in the Status window. So, what’s he big deal you’ll ask, a page just for this command? Not actually, because it may be annoyng to switch to the Status window every time you need to check the IP of a user. So here we’ll make a script which will send a message to our current channel window with the regarding information.

You can use this addon to load the script from within mIRC, instead of writing the lines yourself.

If you want to add the lines yourself, here are the instructions.

Before we begin, let’s recall that you need to press the button in mIRC to access the Remote panel, that is where you edit scripts.

[Updated 15th Sept 2010]
Several visitors have been asking in the comments why, when they do /dns username, they get a strange code instead of the numeric IP address (in the form of 5B26E798.A7F81C6C.2CF41D6B.IP); this is obviously not an IP address, nor a named alias, but just your server that has a “high security” policy, where it normally does not allow users to know each other’s IP addresses and instead outputs that string, which is univocally associated with the user, but cannot be used to determine the real IP. This is a limitation that cannot be worked around per se, still, you could try asking the user for a DCC query session, which is a special private chat where your computers are directly connected to each other, without passing through the server: if the other user accepts your DCC request, then you can see each other’s IP addresses, since your PC’s are directly connected.

8 thoughts on “Find the IP of other people in IRC channels, mIRC script”

Ephestione
2010-01-25 20:50:04
As explained to the first user in the comments, it must be your chat server which gives back modified hostnames for “privacy” reasons.
In other words, when you connect to your IRC server, your real hostname is masked by the server so other users are not able to discover your real IP, unless a DCC session is initiated. Microsoft works as it is a public, resolvable hostname
Alco
2010-01-25 20:10:55
Resolved Timothethug to: Name – Omerta-568f5e3b.direct-adsl.nl , IP –
Resolved Jap|Afk to: Name – Jap.users.omerta , IP –
Resolved Alco` to: Name – Alco-02309.users.omerta , IP –

The only thing that does work is “www.microsoft.com”

How come? and is there something to fix it??
Ephestione
2010-01-15 23:49:05
of course there is, mIRC had a very wide support for scripting language (and supposedly has a better one now, years after I used it), which I knew adequately back then. Now tho, even if I can assure you that it’s possible, and quite easily combining events and file-write functions, I wouldn’t have the sligthtest idea of the code to use :-/
drumm
2010-01-15 23:40:14
Very nice explanation. Is there a way to send the DNS name and/or IP to a log file? Even when a user joins (on JOIN?) with a time stamp?
Ephestione
2010-01-11 09:11:37
THat would be the chat program masking the original hostname of the client.
“.ip” is not a regular top level domain, normal hostnames end with .con, .net, .it, .fr, .uk, .us, and so on
opcinjen
2010-01-11 02:39:46
02:37:21 * Dns resolving ECA050A1.FEAC7A6B.B5003D43.IP
02:37:21 * Dns unable to resolve ECA050A1.FEAC7A6B.B5003D43.IP

I see Carlos, you were reading the comments by the visitors of the italian version of the website. They asked the same question you are asking by the way, and I can only answer the same thing: you can’t.
You see that strange code, because the IRC server you are using is masking the IP addresses of the users for security reasons.
When you do the /dns command, you are asking the IRC server to tell you the user’s IP, but the server doesn’t want to, and instead outputs that hash value.

You could try to open a DCC query with the user (if that is feasible on the server), that way the server will put you in a direct connection between you two, and you will have access to the user’s real IP address, but you can only do that if the other user accepts the DCC query.