Page 1 of 1

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

Posted: Wed Jul 20, 2005 5:22 am
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

Posted: Wed Jul 20, 2005 6:10 am
by Stealth
Clients don't usually use the USERHOST command if the address of the user is not already known to the client...

Posted: Wed Jul 20, 2005 8:53 pm
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.

Posted: Thu Jul 21, 2005 8:29 am
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...

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

Posted: Thu Jul 21, 2005 8:44 am
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.

Posted: Thu Jul 21, 2005 11:41 am
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

Posted: Thu Jul 21, 2005 8:20 pm
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.