From 03ebdc3512354f6873c8948f0e82a7c6a213afe6 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 10 Feb 2004 03:16:26 +0000 Subject: [PATCH] Make starting the bot a little safer; we won't have to worry about trashing our registry file until around 5 minutes after the bot has started. --- scripts/supybot | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/supybot b/scripts/supybot index 3e9d6475f..8a90ece73 100755 --- a/scripts/supybot +++ b/scripts/supybot @@ -64,7 +64,11 @@ def main(): import world import drivers import schedule - world.upkeep() + # We schedule this event rather than have it actually run because if there + # is a failure between now and the time it takes the Owner plugin to load + # all the various plugins, our registry file might be wiped. That's bad. + when = time.time() + conf.supybot.upkeepInterval() + schedule.addEvent(world.upkeep, when, name='upkeep') world.startedAt = started while world.ircs: try: