From 3d60b66ee2c36d6e28812cd472656c0e9013aaaa Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 14 Mar 2005 03:52:30 +0000 Subject: [PATCH] Made the SimpleProxy interface a little more consistent with IrcObjectProxy. --- src/callbacks.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/callbacks.py b/src/callbacks.py index 79fd7dbb3..2293c5af9 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -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