mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Slight cleanup.
This commit is contained in:
parent
b9524115b0
commit
a0e7bd2bd1
@ -650,19 +650,17 @@ class IrcObjectProxy(RichReplyMethods):
|
|||||||
self.args[self.counter] = s
|
self.args[self.counter] = s
|
||||||
self.evalArgs()
|
self.evalArgs()
|
||||||
|
|
||||||
def error(self, s='', private=None, notice=None, **kwargs):
|
def error(self, s='', **kwargs):
|
||||||
if s:
|
if s:
|
||||||
if not isinstance(self.irc, irclib.Irc):
|
if not isinstance(self.irc, irclib.Irc):
|
||||||
self.irc.error(s, private)
|
self.irc.error(s, **kwargs)
|
||||||
else:
|
else:
|
||||||
self.irc.queueMsg(error(self.msg, s, private=private,
|
self.irc.queueMsg(error(self.msg, s, **kwargs))
|
||||||
notice=notice, **kwargs))
|
|
||||||
else:
|
else:
|
||||||
# No argument, let's raise ArgumentError.
|
# No argument, let's raise ArgumentError.
|
||||||
if self.commandMethod is not None:
|
if self.commandMethod is not None:
|
||||||
# We can recurse here because it only gets called once.
|
# We can recurse here because it only gets called once.
|
||||||
self.error(formatArgumentError(self.commandMethod),
|
self.error(formatArgumentError(self.commandMethod), **kwargs)
|
||||||
private=private, notice=notice, **kwargs)
|
|
||||||
self.finished = True
|
self.finished = True
|
||||||
|
|
||||||
def getRealIrc(self):
|
def getRealIrc(self):
|
||||||
@ -819,9 +817,8 @@ class IrcObjectProxyRegexp(RichReplyMethods):
|
|||||||
self.irc = irc
|
self.irc = irc
|
||||||
self.msg = msg
|
self.msg = msg
|
||||||
|
|
||||||
def error(self, s, private=None, notice=None, **kwargs):
|
def error(self, s, **kwargs):
|
||||||
self.irc.queueMsg(error(self.msg, s, private=private,
|
self.irc.queueMsg(error(self.msg, s, **kwargs))
|
||||||
notice=notice, **kwargs))
|
|
||||||
|
|
||||||
def reply(self, s, **kwargs):
|
def reply(self, s, **kwargs):
|
||||||
assert not isinstance(s, ircmsgs.IrcMsg), \
|
assert not isinstance(s, ircmsgs.IrcMsg), \
|
||||||
|
Loading…
Reference in New Issue
Block a user