From 8f8cd95395946dfaa38c4985fe1f6891e43fb41a Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 27 Aug 2016 19:14:37 -0700 Subject: [PATCH] unreal: use umode +xt instead of SETHOST in spawnClient This is to ensure vHosts for all PyLink clients are respected. --- protocols/unreal.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/protocols/unreal.py b/protocols/unreal.py index 2339d9c..add8bea 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -69,6 +69,10 @@ class UnrealProtocol(TS6BaseProtocol): ts = ts or int(time.time()) realname = realname or self.irc.botdata['realname'] realhost = realhost or host + + # Add +xt so that vHost cloaking always works. + modes |= {('+x', None), ('+t', None)} + raw_modes = self.irc.joinModes(modes) u = self.irc.users[uid] = IrcUser(nick, ts, uid, ident=ident, host=host, realname=realname, realhost=realhost, ip=ip, manipulatable=manipulatable, opertype=opertype) @@ -100,11 +104,6 @@ class UnrealProtocol(TS6BaseProtocol): modes=raw_modes, realname=realname, realhost=realhost, ip=encoded_ip)) - # Force the virtual hostname to show correctly by running SETHOST on - # the user. Otherwise, Unreal will show the real host of the person - # instead, which is probably not what we want. - self.updateClient(uid, 'HOST', host) - return u def join(self, client, channel):