mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 04:02:45 +01:00
unreal: use SJOIN in join() to work around weird TS corrupting bugs
This seems to be what Unreal itself does anyways.
This commit is contained in:
parent
119873a9ed
commit
fac6fe506f
@ -106,9 +106,14 @@ class UnrealProtocol(TS6BaseProtocol):
|
|||||||
"""Joins a PyLink client to a channel."""
|
"""Joins a PyLink client to a channel."""
|
||||||
if not self.is_internal_client(client):
|
if not self.is_internal_client(client):
|
||||||
raise LookupError('No such PyLink client exists.')
|
raise LookupError('No such PyLink client exists.')
|
||||||
self._send_with_prefix(client, "JOIN %s" % channel)
|
|
||||||
self._channels[channel].users.add(client)
|
# Forward this on to SJOIN, as using JOIN in Unreal S2S seems to cause TS corruption bugs.
|
||||||
self.users[client].channels.add(channel)
|
# This seems to be what Unreal itself does anyways.
|
||||||
|
if channel not in self.channels and prefix == '':
|
||||||
|
prefix = 'o' # Create new channels with the first joiner as op
|
||||||
|
else:
|
||||||
|
prefix = ''
|
||||||
|
self.sjoin(self.sid, channel, [(prefix, client)])
|
||||||
|
|
||||||
def sjoin(self, server, channel, users, ts=None, modes=set()):
|
def sjoin(self, server, channel, users, ts=None, modes=set()):
|
||||||
"""Sends an SJOIN for a group of users to a channel.
|
"""Sends an SJOIN for a group of users to a channel.
|
||||||
|
Loading…
Reference in New Issue
Block a user