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