mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-14 22:49:23 +01:00
Move the 'ignore=False' trick from callbacks to Scheduler
I fear putting it in callbacks would be overzealous and reset it within the processing of the same message, eg. when using conditional to set the 'ignore' tag before other nested commands run.
This commit is contained in:
parent
f409111872
commit
efed7d8081
@ -148,6 +148,13 @@ class Scheduler(callbacks.Plugin):
|
||||
channel=msg.channel, network=irc.network)
|
||||
if remove:
|
||||
del self.events[str(f.eventId)]
|
||||
|
||||
# A previous run of the command may have set 'ignored' to True,
|
||||
# causing this run to not include response from nested commands;
|
||||
# as NestedCommandsIrcProxy.reply() would confuse it with the
|
||||
# subcommand setting 'ignored' to True itself.
|
||||
msg.tag('ignored', False)
|
||||
|
||||
self.Proxy(irc, msg, tokens)
|
||||
return f
|
||||
|
||||
|
@ -996,13 +996,6 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
||||
# work, but we're being careful.
|
||||
self.args = copy.deepcopy(args)
|
||||
|
||||
# Another trick needed for Scheduler:
|
||||
# A previous run of the command may have set 'ignored' to True,
|
||||
# causing this run to not include response from nested commands;
|
||||
# as NestedCommandsIrcProxy.reply() would confuse it with the
|
||||
# subcommand setting 'ignored' to True itself.
|
||||
msg.tag('ignored', False)
|
||||
|
||||
self.counter = 0
|
||||
self._resetReplyAttributes()
|
||||
if not args:
|
||||
|
Loading…
Reference in New Issue
Block a user