Get (Anope)Vhost instead of the real host as ircop

These are old archives. They are kept for historic purposes only.
Post Reply
sECuRE
Posts: 3
Joined: Sun Aug 22, 2004 12:53 pm

Get (Anope)Vhost instead of the real host as ircop

Post by sECuRE »

Hi,

I got a little Problem: Some IRC clients use USERHOST before a ban to get the hostname they have to ban. This works well in usermode as they get for example "[email protected]" and ban "hidden.host" (the vhost of the user, set by anope for example). But as an ircop, you see "real.host.t-dialin.net" for example, or, if they use a bnc running on the irc server itself "localhost". You can imagine what happens if you ban "localhost" - all other bnc users can't join anymore.

So: Is there a command or a flag for USERHOST which returns the hostmask as the user would see them or is there another method which is suitable for that?

Thanks & cu
Stealth
Head of Support
Posts: 2085
Joined: Tue Jun 15, 2004 8:50 pm
Location: Chino Hills, CA, US
Contact:

Post by Stealth »

Clients don't usually use the USERHOST command if the address of the user is not already known to the client...
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Indeed. As /who returns the cloaked host by default and most clients should accept an address from who as well as userhost, you can just do a /who +c #channel on join (or just /who #channel if you want compatibility) and have the address list filled with the vhosts on join.
sdamon
Posts: 46
Joined: Tue Jun 07, 2005 7:28 am

Post by sdamon »

this becomes an issu when you do /ban nick of a nick not on channel giveing the full host to an oper...but that also bans the user...
Dukat
Posts: 1083
Joined: Tue Mar 16, 2004 5:44 pm
Location: Switzerland

Re: Get (Anope)Vhost instead of the real host as ircop

Post by Dukat »

sECuRE wrote:But as an ircop, you see "real.host.t-dialin.net" for example, or, if they use a bnc running on the irc server itself "localhost". You can imagine what happens if you ban "localhost" - all other bnc users can't join anymore.
It doesn't make a difference... If you ban localhost, all users connecting from localhost can't join. If you ban the cloaked "localhost", it's the same... Nobody from localhost can join.
People connecting from the same host always get the same cloaked host.
If you don't make mistakes, you aren't really trying.
- Coleman Hawkins
sECuRE
Posts: 3
Joined: Sun Aug 22, 2004 12:53 pm

Post by sECuRE »

Hi,

ok, so I'd better use /who #channel for getting the host, but on big channels this causes much traffic (2000 Users+), isn't there a more performant way to get the vhost of only this user?

btw: it's not the cloaked localhost, it's a vhost, so if the setup is like this:
User lala (xyz@localhost is realhost) uses hostname [email protected]
User lulu (xy3@localhost is realhost) uses hostname [email protected]

Thanks & cu
aquanight
Official supporter
Posts: 862
Joined: Tue Mar 09, 2004 10:47 pm
Location: Boise, ID

Post by aquanight »

Actually, who #channel on join is the easiest way to do it.

Also, a word of caution: users could easily evade your ban by simply doing MODE theirnick -x. And even if you restrict that, there's also /msg hostserv off.
Post Reply