mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-11 06:00:59 -05:00
26 lines
639 B
Python
26 lines
639 B
Python
# coding=utf-8
|
|
|
|
from __future__ import unicode_literals, absolute_import, division, print_function
|
|
|
|
import sopel.module
|
|
from .BotEvents import check_bot_events, startup_bot_event, set_bot_event
|
|
from sopel_modules.SpiceBot_SBTools import bot_logging
|
|
|
|
import time
|
|
|
|
|
|
@sopel.module.event('001')
|
|
@sopel.module.rule('.*')
|
|
def bot_startup_connection(bot, trigger):
|
|
|
|
if check_bot_events(bot, ["startup_complete"]):
|
|
return
|
|
startup_bot_event(bot, "connected")
|
|
|
|
while not len(bot.channels.keys()) > 0:
|
|
pass
|
|
time.sleep(1)
|
|
|
|
set_bot_event(bot, "connected")
|
|
bot_logging(bot, 'Sopel_BotEvents', "Connected to IRC")
|