This was partly touched upon and explained in another thread theme: help to ip virtual
To get the real IP address that the user used to connect to the network, you must have certain privileges and server administrator rights (IRCop
) to provide security control.
If you are a regular user, then only what you can see is available to you, when the user join on the channel. The IP address can be hidden by the IRCd configuration settings and will be displayed as a host or piece of a virtual host as an additional prefix. Also, the user can use the service to use the virtual host (HostServ) or can himself turn on the "cloaking" user mode (+x
), which will help encrypt the IP address into a in random (special) set of characters and numbers. For example: "Y1UWY.7YTC6.2Z1Y1.HQSJM
". This will be what you can see when you run the "/WHOIS nick
" command. Or, if such a mode is already configured in the IRCd configuration for automatic installation for everyone who connects to the chat. All this, of course, helps to ensure anonymity (hide IP) and protect users from threats hacker attacks from other chat participants (ill-wishers) and just bad users.
In addition, users can independently use various externals means of hiding the real IP address through (Proxy/VPN), but most networks are protected from this and when such addresses are found, they are automatically blocked from connecting for the network. Usually such addresses are used by bad users in the chat for hooliganism in order to avoid personal identification and real punishment, therefore highly discouraged not recommended use such addresses for persistent (regular) connections. Even if you can will be able to see this IP address, he will be a fake, which replaces the real IP address of the user.
Some sites and web gates also provide this hiding option. This may be their principled policy, which, of course, cannot please the administrators of servers and may hinder the maintenance of order in the chat.
Therefore, as you already understood, you or your bot cannot extract the real IP address under certain conditions or if you for this do not have enough rights to do so.
But this can in no way prevent you from setting a ban on the channel. You can always set a ban to the address host that you see when the user joins on the channel and this will work as well.
//echo -a $address(Nickname,2)
/ban #channel Nickname 2
Using various bots is just a convenient addition to the chat, and if they suddenly break down for some reason, then you should know how to do it using mIRC client commands or IRCd commands. These are the basics.
How to properly set a ban using the mIRC command is described here: https://en.wikichip.org/wiki/mirc/commands/ban
. Or via the server command: "/MODE #channel +b nick!ident@host