mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 09:19:23 +01:00
protocols: strip leading prefix modes before checking whether msg target is a channel
(cherry picked from commit 2c7b5669bd
)
This commit is contained in:
parent
f061a2fc68
commit
9a59c68370
@ -1115,9 +1115,11 @@ class P10Protocol(IRCS2SProtocol):
|
|||||||
# <- ABAAA O AyAAA :notice text
|
# <- ABAAA O AyAAA :notice text
|
||||||
target = args[0]
|
target = args[0]
|
||||||
|
|
||||||
# We use lowercase channels internally, but uppercase UIDs.
|
# We use lower case channels internally, but mixed case UIDs.
|
||||||
if utils.isChannel(target):
|
stripped_target = target.lstrip(''.join(self.irc.prefixmodes.values()))
|
||||||
|
if utils.isChannel(stripped_target):
|
||||||
target = self.irc.toLower(target)
|
target = self.irc.toLower(target)
|
||||||
|
|
||||||
return {'target': target, 'text': args[1]}
|
return {'target': target, 'text': args[1]}
|
||||||
|
|
||||||
handle_notice = handle_privmsg
|
handle_notice = handle_privmsg
|
||||||
|
@ -357,9 +357,12 @@ class TS6BaseProtocol(IRCS2SProtocol):
|
|||||||
# <- :70MAAAAAA PRIVMSG #dev :afasfsa
|
# <- :70MAAAAAA PRIVMSG #dev :afasfsa
|
||||||
# <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa
|
# <- :70MAAAAAA NOTICE 0ALAAAAAA :afasfsa
|
||||||
target = args[0]
|
target = args[0]
|
||||||
|
|
||||||
# We use lowercase channels internally, but uppercase UIDs.
|
# We use lowercase channels internally, but uppercase UIDs.
|
||||||
if utils.isChannel(target):
|
stripped_target = target.lstrip(''.join(self.irc.prefixmodes.values()))
|
||||||
|
if utils.isChannel(stripped_target):
|
||||||
target = self.irc.toLower(target)
|
target = self.irc.toLower(target)
|
||||||
|
|
||||||
return {'target': target, 'text': args[1]}
|
return {'target': target, 'text': args[1]}
|
||||||
|
|
||||||
handle_notice = handle_privmsg
|
handle_notice = handle_privmsg
|
||||||
|
Loading…
Reference in New Issue
Block a user