mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +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):
|
||||
self.irc = irc
|
||||
self.msg = msg
|
||||
self.getRealIrc()._setMsgChannel(self.msg)
|
||||
|
||||
def getRealIrc(self):
|
||||
"""Returns the real irclib.Irc object underlying this proxy chain."""
|
||||
@ -636,8 +637,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
||||
_mores = ircutils.IrcDict()
|
||||
def __init__(self, irc, msg, args, nested=0):
|
||||
assert isinstance(args, list), 'Args should be a list, not a string.'
|
||||
self.irc = irc
|
||||
self.msg = msg
|
||||
super(NestedCommandsIrcProxy, self).__init__(irc, msg)
|
||||
self.nested = nested
|
||||
self.repliedTo = False
|
||||
if not self.nested and isinstance(irc, self.__class__):
|
||||
|
Loading…
Reference in New Issue
Block a user