mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
shutdown method breaks
This commit is contained in:
parent
f65212c2c3
commit
e54e3666dd
@ -50,16 +50,19 @@ def bot_events_connected(bot, trigger):
|
||||
|
||||
bot_events_setup_check(bot)
|
||||
|
||||
while 'SpiceBot_Events' in bot.memory:
|
||||
if len(bot.memory['SpiceBot_Events']["queue"]):
|
||||
number = bot.memory['SpiceBot_Events']["queue"][0]["number"]
|
||||
message = bot.memory['SpiceBot_Events']["queue"][0]["message"]
|
||||
pretrigger = PreTrigger(
|
||||
bot.nick,
|
||||
":SpiceBot_Events " + str(number) + " " + str(bot.nick) + " :" + message
|
||||
)
|
||||
bot.dispatch(pretrigger)
|
||||
del bot.memory['SpiceBot_Events']["queue"][0]
|
||||
while True:
|
||||
try:
|
||||
if len(bot.memory['SpiceBot_Events']["queue"]):
|
||||
number = bot.memory['SpiceBot_Events']["queue"][0]["number"]
|
||||
message = bot.memory['SpiceBot_Events']["queue"][0]["message"]
|
||||
pretrigger = PreTrigger(
|
||||
bot.nick,
|
||||
":SpiceBot_Events " + str(number) + " " + str(bot.nick) + " :" + message
|
||||
)
|
||||
bot.dispatch(pretrigger)
|
||||
del bot.memory['SpiceBot_Events']["queue"][0]
|
||||
except KeyError:
|
||||
return
|
||||
|
||||
|
||||
@sopel.module.event('1004')
|
||||
|
||||
@ -53,10 +53,13 @@ def join_log_channel(bot, trigger):
|
||||
|
||||
bot_logs_setup_check(bot)
|
||||
|
||||
while 'SpiceBot_Logs' in bot.memory:
|
||||
if len(bot.memory['SpiceBot_Logs']["queue"]):
|
||||
bot.say(str(bot.memory['SpiceBot_Logs']["queue"][0]), channel)
|
||||
del bot.memory['SpiceBot_Logs']["queue"][0]
|
||||
while True:
|
||||
try:
|
||||
if len(bot.memory['SpiceBot_Logs']["queue"]):
|
||||
bot.say(str(bot.memory['SpiceBot_Logs']["queue"][0]), channel)
|
||||
del bot.memory['SpiceBot_Logs']["queue"][0]
|
||||
except KeyError:
|
||||
return
|
||||
|
||||
|
||||
@sopel.module.event('2004')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user