mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-11-27 05:07:30 +01:00
callbacks.py: Remove duplicated getRealIrc() definition
NestedCommandsIrcProxy inherits the method from ReplyIrcProxy. (Also fix some typos.) Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
2fa0f6dedc
commit
53cac5b078
@ -528,6 +528,7 @@ class ReplyIrcProxy(RichReplyMethods):
|
||||
self.msg = msg
|
||||
|
||||
def getRealIrc(self):
|
||||
"""Returns the real irclib.Irc object underlying this proxy chain."""
|
||||
if isinstance(self.irc, irclib.Irc):
|
||||
return self.irc
|
||||
else:
|
||||
@ -572,7 +573,7 @@ class ReplyIrcProxy(RichReplyMethods):
|
||||
SimpleProxy = ReplyIrcProxy # Backwards-compatibility
|
||||
|
||||
class NestedCommandsIrcProxy(ReplyIrcProxy):
|
||||
"A proxy object to allow proper nested of commands (even threaded ones)."
|
||||
"A proxy object to allow proper nesting of commands (even threaded ones)."
|
||||
_mores = ircutils.IrcDict()
|
||||
def __init__(self, irc, msg, args, nested=0):
|
||||
assert isinstance(args, list), 'Args should be a list, not a string.'
|
||||
@ -939,13 +940,6 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
||||
else:
|
||||
raise ArgumentError
|
||||
|
||||
def getRealIrc(self):
|
||||
"""Returns the real irclib.Irc object underlying this proxy chain."""
|
||||
if isinstance(self.irc, irclib.Irc):
|
||||
return self.irc
|
||||
else:
|
||||
return self.irc.getRealIrc()
|
||||
|
||||
def __getattr__(self, attr):
|
||||
return getattr(self.irc, attr)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user