mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-26 04:32:51 +01:00
Don't temporarily set msg.channel to invalid values.
This causes issue when multiple command threads deal with the same message.
This commit is contained in:
parent
6c5072cfe0
commit
84c1f1572d
@ -886,15 +886,15 @@ class Irc(IrcCommandDispatcher, log.Firewalled):
|
|||||||
self._setMsgChannel(msg)
|
self._setMsgChannel(msg)
|
||||||
|
|
||||||
def _setMsgChannel(self, msg):
|
def _setMsgChannel(self, msg):
|
||||||
|
channel = None
|
||||||
if msg.args:
|
if msg.args:
|
||||||
msg.channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
if msg.command in ('NOTICE', 'PRIVMSG') and \
|
if msg.command in ('NOTICE', 'PRIVMSG') and \
|
||||||
not conf.supybot.protocols.irc.strictRfc():
|
not conf.supybot.protocols.irc.strictRfc():
|
||||||
msg.channel = self.stripChannelPrefix(msg.channel)
|
channel = self.stripChannelPrefix(channel)
|
||||||
if not self.isChannel(msg.channel):
|
if not self.isChannel(channel):
|
||||||
msg.channel = None
|
channel = None
|
||||||
else:
|
msg.channel = channel
|
||||||
msg.channel = None
|
|
||||||
|
|
||||||
def stripChannelPrefix(self, channel):
|
def stripChannelPrefix(self, channel):
|
||||||
statusmsg_chars = self.state.supported.get('statusmsg', '')
|
statusmsg_chars = self.state.supported.get('statusmsg', '')
|
||||||
|
Loading…
Reference in New Issue
Block a user