mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Made the SimpleProxy interface a little more consistent with IrcObjectProxy.
This commit is contained in:
parent
9ec4493201
commit
3d60b66ee2
@ -1212,6 +1212,12 @@ class SimpleProxy(RichReplyMethods):
|
||||
self.irc = irc
|
||||
self.msg = msg
|
||||
|
||||
def getRealIrc(self):
|
||||
if isinstance(self.irc, irclib.Irc):
|
||||
return self.irc
|
||||
else:
|
||||
return self.irc.getRealIrc()
|
||||
|
||||
def error(self, s, msg=None, **kwargs):
|
||||
if 'Raise' in kwargs and kwargs['Raise']:
|
||||
if s:
|
||||
@ -1229,6 +1235,7 @@ class SimpleProxy(RichReplyMethods):
|
||||
msg = self.msg
|
||||
assert not isinstance(s, ircmsgs.IrcMsg), \
|
||||
'Old code alert: there is no longer a "msg" argument to reply.'
|
||||
kwargs.pop('noLengthCheck', None)
|
||||
m = reply(msg, s, **kwargs)
|
||||
self.irc.queueMsg(m)
|
||||
return m
|
||||
|
Loading…
Reference in New Issue
Block a user