mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-26 13:01:07 -05:00
RelayNext: Fix error when receiving PMs (#113)
2bd13fa0680572c0940ab249d2aa693453aa1787 replaced `msg.args[0]` with `msg.channel`, but the latter is `None` on PMs. Additionally, `irc.state.channels.__contains__` performs normalization itself (and using RFC1459 normalization rather than Unicode), so it is not needed to normalize this early.
This commit is contained in:
parent
36b1789d45
commit
ad7704c49f
@ -292,10 +292,10 @@ class RelayNext(callbacks.Plugin):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def relay(self, irc, msg, channel, isAnnouncement=False):
|
def relay(self, irc, msg, channel, isAnnouncement=False):
|
||||||
channel = channel.lower()
|
|
||||||
self.log.debug("RelayNext (%s): got channel %s", irc.network, channel)
|
self.log.debug("RelayNext (%s): got channel %s", irc.network, channel)
|
||||||
if not channel in irc.state.channels:
|
if not channel in irc.state.channels:
|
||||||
return
|
return
|
||||||
|
channel = channel.lower()
|
||||||
|
|
||||||
# Check for ignored events first. Checking for "'.' not in msg.nick" is for skipping
|
# Check for ignored events first. Checking for "'.' not in msg.nick" is for skipping
|
||||||
# ignore checks from servers.
|
# ignore checks from servers.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user