3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-23 19:19:31 +01:00

unreal: use umode +xt instead of SETHOST in spawnClient

This is to ensure vHosts for all PyLink clients are respected.
This commit is contained in:
James Lu 2016-08-27 19:14:37 -07:00
parent 1c4cb94a13
commit 8f8cd95395

View File

@ -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):