3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 13:09:23 +01:00

unreal: expand PUIDs in outgoing channel modes

This fixes things like relay modes / automode targets not working.
This commit is contained in:
James Lu 2017-04-01 12:39:38 -07:00
parent 8465edd5af
commit df4acbf5d5

View File

@ -222,6 +222,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