3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

ts6_common: rewrite =#channel messages to @#channel (charybdis +z support)

This commit is contained in:
James Lu 2016-07-31 20:38:25 -07:00
parent f2a5e1dc78
commit 2ca3dfe689

View File

@ -351,7 +351,13 @@ class TS6BaseProtocol(IRCS2SProtocol):
# <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa
target = args[0]
# Coerse =#channel from Charybdis op moderated +z to @#channel.
if target.startswith('='):
target = '@' + target[1:]
# We use lowercase channels internally, but uppercase UIDs.
# Strip the target of leading prefix modes (for targets like @#channel)
# before checking whether it's actually a channel.
stripped_target = target.lstrip(''.join(self.irc.prefixmodes.values()))
if utils.isChannel(stripped_target):
target = self.irc.toLower(target)