mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +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.irc = irc
|
||||||
self.msg = msg
|
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):
|
def error(self, s, msg=None, **kwargs):
|
||||||
if 'Raise' in kwargs and kwargs['Raise']:
|
if 'Raise' in kwargs and kwargs['Raise']:
|
||||||
if s:
|
if s:
|
||||||
@ -1229,6 +1235,7 @@ class SimpleProxy(RichReplyMethods):
|
|||||||
msg = self.msg
|
msg = self.msg
|
||||||
assert not isinstance(s, ircmsgs.IrcMsg), \
|
assert not isinstance(s, ircmsgs.IrcMsg), \
|
||||||
'Old code alert: there is no longer a "msg" argument to reply.'
|
'Old code alert: there is no longer a "msg" argument to reply.'
|
||||||
|
kwargs.pop('noLengthCheck', None)
|
||||||
m = reply(msg, s, **kwargs)
|
m = reply(msg, s, **kwargs)
|
||||||
self.irc.queueMsg(m)
|
self.irc.queueMsg(m)
|
||||||
return m
|
return m
|
||||||
|
Loading…
Reference in New Issue
Block a user