diff --git a/sopel_modules/SpiceBot_Events/Connected.py b/sopel_modules/SpiceBot_Events/Connected.py index 958b335..c99f0db 100644 --- a/sopel_modules/SpiceBot_Events/Connected.py +++ b/sopel_modules/SpiceBot_Events/Connected.py @@ -6,14 +6,11 @@ import sopel.module from sopel_modules.SpiceBot.Events import botevents -import time - @sopel.module.event(botevents.BOT_WELCOME) @sopel.module.rule('.*') def bot_events_Connected(bot, trigger): """Here, we wait until we are in at least one channel""" - while not len(bot.channels.keys()): + while not len(bot.channels.keys()) > 0: pass - time.sleep(1) botevents.trigger(bot, botevents.BOT_CONNECTED, "Bot Connected to IRC") diff --git a/sopel_modules/SpiceBot_StartupMonologue/StartupMonologue_Display.py b/sopel_modules/SpiceBot_StartupMonologue/StartupMonologue_Display.py index 86d3741..1756770 100644 --- a/sopel_modules/SpiceBot_StartupMonologue/StartupMonologue_Display.py +++ b/sopel_modules/SpiceBot_StartupMonologue/StartupMonologue_Display.py @@ -12,14 +12,10 @@ from sopel_modules.SpiceBot_SBTools import humanized_time import time -@sopel.module.event(botevents.BOT_WELCOME) +@sopel.module.event(botevents.BOT_CONNECTED) @sopel.module.rule('.*') def bot_startup_monologue_start(bot, trigger): - while not len(bot.channels.keys()): - pass - time.sleep(1) - # Startup botlogs.log('SpiceBot_StartupMonologue', bot.nick + " is now starting. Please wait while I load my configuration") bot.osd(" is now starting. Please wait while I load my configuration.", bot.channels.keys(), 'ACTION')