mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21: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:
parent
1c4cb94a13
commit
8f8cd95395
@ -69,6 +69,10 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
ts = ts or int(time.time())
|
ts = ts or int(time.time())
|
||||||
realname = realname or self.irc.botdata['realname']
|
realname = realname or self.irc.botdata['realname']
|
||||||
realhost = realhost or host
|
realhost = realhost or host
|
||||||
|
|
||||||
|
# Add +xt so that vHost cloaking always works.
|
||||||
|
modes |= {('+x', None), ('+t', None)}
|
||||||
|
|
||||||
raw_modes = self.irc.joinModes(modes)
|
raw_modes = self.irc.joinModes(modes)
|
||||||
u = self.irc.users[uid] = IrcUser(nick, ts, uid, ident=ident, host=host, realname=realname,
|
u = self.irc.users[uid] = IrcUser(nick, ts, uid, ident=ident, host=host, realname=realname,
|
||||||
realhost=realhost, ip=ip, manipulatable=manipulatable, opertype=opertype)
|
realhost=realhost, ip=ip, manipulatable=manipulatable, opertype=opertype)
|
||||||
@ -100,11 +104,6 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
modes=raw_modes, realname=realname,
|
modes=raw_modes, realname=realname,
|
||||||
realhost=realhost, ip=encoded_ip))
|
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
|
return u
|
||||||
|
|
||||||
def join(self, client, channel):
|
def join(self, client, channel):
|
||||||
|
Loading…
Reference in New Issue
Block a user