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

relay: also filter out low TS values in burst relaying

This commit is contained in:
James Lu 2017-01-06 22:48:11 -08:00
parent d4b4cfb32e
commit e0bda6b850

View File

@ -610,6 +610,12 @@ def relay_joins(irc, channel, users, ts, burst=True):
Relays one or more users' joins from a channel to its relay links. Relays one or more users' joins from a channel to its relay links.
""" """
joined_nets = {} joined_nets = {}
if ts < 750000:
current_ts = int(time.time())
log.debug('(%s) relay: resetting too low TS value of %s on %s to %s', irc.name, ts, users, current_ts)
ts = current_ts
for name, remoteirc in world.networkobjects.copy().items(): for name, remoteirc in world.networkobjects.copy().items():
queued_users = [] queued_users = []
if name == irc.name or not remoteirc.connected.is_set(): if name == irc.name or not remoteirc.connected.is_set():