From 99e6fa80c50b691c25d958ba0e03fc94bae83219 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Sat, 21 Apr 2018 18:03:36 +0200 Subject: [PATCH] add a small delay to avoid the bot triggering chanserv flood protection when a channel with a lot of members needs acl fixing, closes #214 I think --- src/ircbot/irc3module.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ircbot/irc3module.py b/src/ircbot/irc3module.py index bd6e386d..3ef7c761 100644 --- a/src/ircbot/irc3module.py +++ b/src/ircbot/irc3module.py @@ -5,6 +5,7 @@ from django.conf import settings from django.utils import timezone from events.models import Routing from teams.utils import get_team_from_irc_channel +import time import logging logger = logging.getLogger("bornhack.%s" % __name__) @@ -301,6 +302,9 @@ class Plugin(object): # also add autoinvite for this username self.bot.mode(channel, '+I', '$a:%s' % username) + # add a delay so the bot doesn't flood itself off + time.sleep(1) + @irc3.extend def fix_missing_acls(self):