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

clientbot: make sure incoming server messages don't clash with a PSID/PUID

This commit is contained in:
James Lu 2017-07-02 22:13:43 -07:00
parent 1e39fb78db
commit d4260734dc

View File

@ -411,6 +411,7 @@ class ClientbotWrapperProtocol(IRCCommonProtocol):
# pseudo-uids and pseudo-sids as we see prefixes.
if ('!' not in sender) and '.' in sender:
# Sender is a server name. XXX: make this check more foolproof
assert '@' not in sender, "Incoming server name %r clashes with a PUID!" % sender
if sender not in self.servers:
self.spawn_server(sender, internal=False)
idsource = sender