mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 11:42:51 +01:00
Merge branch 'master' into devel
This commit is contained in:
commit
4daa94c014
@ -144,9 +144,9 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
reason = 'No reason given'
|
||||
|
||||
# Mangle kick targets for IRCds that require it.
|
||||
target = self._expandPUID(target)
|
||||
real_target = self._expandPUID(target)
|
||||
|
||||
self._send(numeric, 'KICK %s %s :%s' % (channel, target, reason))
|
||||
self._send(numeric, 'KICK %s %s :%s' % (channel, real_target, reason))
|
||||
|
||||
# We can pretend the target left by its own will; all we really care about
|
||||
# is that the target gets removed from the channel userlist, and calling
|
||||
@ -382,6 +382,7 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
||||
except IndexError:
|
||||
reason = ''
|
||||
|
||||
log.debug('(%s) Removing kick target %s from %s', self.irc.name, kicked, channel)
|
||||
self.handle_part(kicked, 'KICK', [channel, reason])
|
||||
return {'channel': channel, 'target': kicked, 'text': reason}
|
||||
|
||||
|
@ -223,6 +223,13 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
self.irc.applyModes(target, modes)
|
||||
|
||||
if utils.isChannel(target):
|
||||
|
||||
# Make sure we expand any PUIDs when sending outgoing modes...
|
||||
for idx, mode in enumerate(modes):
|
||||
if mode[0][-1] in self.irc.prefixmodes:
|
||||
log.debug('(%s) mode: expanding PUID of mode %s', self.irc.name, str(mode))
|
||||
modes[idx] = (mode[0], self._expandPUID(mode[1]))
|
||||
|
||||
# The MODE command is used for channel mode changes only
|
||||
ts = ts or self.irc.channels[self.irc.toLower(target)].ts
|
||||
|
||||
@ -616,7 +623,9 @@ class UnrealProtocol(TS6BaseProtocol):
|
||||
elif userpair.startswith("'"):
|
||||
changedmodes.add(('+I', userpair[1:]))
|
||||
else:
|
||||
r = re.search(r'([^\w]*)(.*)', userpair)
|
||||
# Note: don't be too zealous in matching here or we'll break with nicks
|
||||
# like "[abcd]".
|
||||
r = re.search(r'([~*@%+]*)(.*)', userpair)
|
||||
user = r.group(2)
|
||||
|
||||
if not user:
|
||||
|
Loading…
Reference in New Issue
Block a user