diff --git a/rerunbot.py b/rerunbot.py index c41253e..ea379cb 100644 --- a/rerunbot.py +++ b/rerunbot.py @@ -116,7 +116,8 @@ class ReplayBot(irc.bot.SingleServerIRCBot): if int(tags['user-id']) != self.control_user: send_response('Sorry @{0}, you are not allowed to do this'.format(tags['display-name'])) return - self.reactor.scheduler.queue.clear() + with self.reactor.mutex: + self.reactor.scheduler.queue.clear() def _post_message(self, user, msg): self.connection.privmsg(self.output_channel, '[{0}]: {1}'.format(user, msg))