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

This commit is contained in:
Thomas Steen Rasmussen 2018-04-21 18:03:36 +02:00
parent 193c182422
commit 99e6fa80c5

View file

@ -5,6 +5,7 @@ from django.conf import settings
from django.utils import timezone from django.utils import timezone
from events.models import Routing from events.models import Routing
from teams.utils import get_team_from_irc_channel from teams.utils import get_team_from_irc_channel
import time
import logging import logging
logger = logging.getLogger("bornhack.%s" % __name__) logger = logging.getLogger("bornhack.%s" % __name__)
@ -301,6 +302,9 @@ class Plugin(object):
# also add autoinvite for this username # also add autoinvite for this username
self.bot.mode(channel, '+I', '$a:%s' % 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 @irc3.extend
def fix_missing_acls(self): def fix_missing_acls(self):