mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-27 21:19:31 +01:00
clientbot: forward SJOIN on the main client as JOIN (#299)
This commit is contained in:
parent
3a0a2c7f1c
commit
226089cc3c
@ -225,7 +225,12 @@ class ClientbotWrapperProtocol(Protocol):
|
|||||||
# given. modes and TS are currently ignored.
|
# given. modes and TS are currently ignored.
|
||||||
puids = {u[-1] for u in users}
|
puids = {u[-1] for u in users}
|
||||||
for user in puids:
|
for user in puids:
|
||||||
self.irc.users[user].channels.add(channel)
|
if self.irc.pseudoclient and self.irc.pseudoclient.uid == user:
|
||||||
|
# If the SJOIN affects our main client, forward it as a regular JOIN.
|
||||||
|
self.join(user, channel)
|
||||||
|
else:
|
||||||
|
# Otherwise, track the state for our virtual clients.
|
||||||
|
self.irc.users[user].channels.add(channel)
|
||||||
|
|
||||||
self.irc.channels[channel].users |= puids
|
self.irc.channels[channel].users |= puids
|
||||||
nicks = {self.irc.getFriendlyName(u) for u in puids}
|
nicks = {self.irc.getFriendlyName(u) for u in puids}
|
||||||
|
Loading…
Reference in New Issue
Block a user