From df4acbf5d5e5cc113d62a1f1641d3716d5d47158 Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 1 Apr 2017 12:39:38 -0700 Subject: [PATCH] unreal: expand PUIDs in outgoing channel modes This fixes things like relay modes / automode targets not working. --- protocols/unreal.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/protocols/unreal.py b/protocols/unreal.py index 4349f5e..80ce97d 100644 --- a/protocols/unreal.py +++ b/protocols/unreal.py @@ -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