From b88ccbf9cb5ed9e6a310ef7fe99da0d0a5689f7d Mon Sep 17 00:00:00 2001 From: deathbybandaid Date: Mon, 20 May 2019 07:46:03 -0400 Subject: [PATCH] better reconnect logic --- sopel_modules/SpiceBot_Events/Connection_Count.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sopel_modules/SpiceBot_Events/Connection_Count.py b/sopel_modules/SpiceBot_Events/Connection_Count.py index ca004e3..786271b 100644 --- a/sopel_modules/SpiceBot_Events/Connection_Count.py +++ b/sopel_modules/SpiceBot_Events/Connection_Count.py @@ -11,4 +11,5 @@ from sopel_modules.SpiceBot.Events import botevents @sopel.module.rule('.*') def bot_startup_welcome(bot, trigger): botevents.SpiceBot_Events["RPL_WELCOME_Count"] += 1 - botevents.trigger(bot, botevents.BOT_RECONNECTED, "Bot Connected to IRC") + if botevents.SpiceBot_Events["RPL_WELCOME_Count"] > 1: + botevents.trigger(bot, botevents.BOT_RECONNECTED, "Bot ReConnected to IRC")