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

Merge branch 'master' into devel

This commit is contained in:
James Lu 2016-01-30 23:39:08 -08:00
commit 5877031203
2 changed files with 14 additions and 0 deletions

View File

@ -467,6 +467,13 @@ class InspIRCdProtocol(TS6BaseProtocol):
namelist = []
for user in userlist:
modeprefix, user = user.split(',', 1)
# Don't crash when we get an invalid UID.
if user not in self.irc.users:
log.debug('(%s) handle_fjoin: tried to introduce user %s not in our user list, ignoring...',
self.irc.name, user)
continue
namelist.append(user)
self.irc.users[user].channels.add(channel)
if their_ts <= our_ts:

View File

@ -441,6 +441,13 @@ class TS6Protocol(TS6BaseProtocol):
finalprefix = ''
assert user, 'Failed to get the UID from %r; our regex needs updating?' % userpair
log.debug('(%s) handle_sjoin: got modeprefix %r for user %r', self.irc.name, modeprefix, user)
# Don't crash when we get an invalid UID.
if user not in self.irc.users:
log.debug('(%s) handle_sjoin: tried to introduce user %s not in our user list, ignoring...',
self.irc.name, user)
continue
for m in modeprefix:
# Iterate over the mapping of prefix chars to prefixes, and
# find the characters that match.