mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 13:09:23 +01:00
relay: fall back to the current time on TS-less servers if the remote channel doesn't exist
This commit is contained in:
parent
136e5fbee7
commit
9380336948
@ -676,7 +676,10 @@ def relay_joins(irc, channel, users, ts, **kwargs):
|
|||||||
if not irc.has_cap('has-ts'):
|
if not irc.has_cap('has-ts'):
|
||||||
# Special hack for clientbot: just use the remote's modes so mode changes
|
# Special hack for clientbot: just use the remote's modes so mode changes
|
||||||
# take precendence. (TS is always outside the clientbot's control)
|
# take precendence. (TS is always outside the clientbot's control)
|
||||||
ts = remoteirc.channels[remotechan].ts
|
if remotechan in remoteirc.channels:
|
||||||
|
ts = remoteirc.channels[remotechan].ts
|
||||||
|
else:
|
||||||
|
ts = int(time.time())
|
||||||
else:
|
else:
|
||||||
ts = irc.channels[channel].ts
|
ts = irc.channels[channel].ts
|
||||||
prefixes = get_prefix_modes(irc, remoteirc, channel, user)
|
prefixes = get_prefix_modes(irc, remoteirc, channel, user)
|
||||||
|
Loading…
Reference in New Issue
Block a user