mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-12 13:12:35 +01:00
Set msg.channel in ReplyIrcProxy and NestedCommandsIrcProxy.
Needed when plugins use a self.Proxy with a crafted message; else the called commands will assume the message was sent in private.
This commit is contained in:
parent
de9cea89cf
commit
67c2bacd69
@ -585,6 +585,7 @@ class ReplyIrcProxy(RichReplyMethods):
|
|||||||
def __init__(self, irc, msg):
|
def __init__(self, irc, msg):
|
||||||
self.irc = irc
|
self.irc = irc
|
||||||
self.msg = msg
|
self.msg = msg
|
||||||
|
self.getRealIrc()._setMsgChannel(self.msg)
|
||||||
|
|
||||||
def getRealIrc(self):
|
def getRealIrc(self):
|
||||||
"""Returns the real irclib.Irc object underlying this proxy chain."""
|
"""Returns the real irclib.Irc object underlying this proxy chain."""
|
||||||
@ -636,8 +637,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
|||||||
_mores = ircutils.IrcDict()
|
_mores = ircutils.IrcDict()
|
||||||
def __init__(self, irc, msg, args, nested=0):
|
def __init__(self, irc, msg, args, nested=0):
|
||||||
assert isinstance(args, list), 'Args should be a list, not a string.'
|
assert isinstance(args, list), 'Args should be a list, not a string.'
|
||||||
self.irc = irc
|
super(NestedCommandsIrcProxy, self).__init__(irc, msg)
|
||||||
self.msg = msg
|
|
||||||
self.nested = nested
|
self.nested = nested
|
||||||
self.repliedTo = False
|
self.repliedTo = False
|
||||||
if not self.nested and isinstance(irc, self.__class__):
|
if not self.nested and isinstance(irc, self.__class__):
|
||||||
|
Loading…
Reference in New Issue
Block a user