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.

This commit is contained in:
Jeremy Fincher 2004-02-10 03:16:26 +00:00
parent d6f79c4a56
commit 03ebdc3512
1 changed files with 5 additions and 1 deletions

View File

@ -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: