Pause between joins to avoid flooding.

* gerritbot/bot.py(GerritBot.on_welcome): Add a 0.5-second pause
between channel join commands to avoid being kicked for flooding.

Change-Id: I8edad4b389683e62b58f5b6e81e5f4cb1e0dad97
This commit is contained in:
Jeremy Stanley 2013-06-06 19:22:02 +00:00
parent 6563e96c89
commit a62ff34717
1 changed files with 1 additions and 0 deletions

View File

@ -93,6 +93,7 @@ class GerritBot(irc.bot.SingleServerIRCBot):
for channel in self.channel_list:
c.join(channel)
self.log.info('Joined channel %s' % channel)
time.sleep(0.5)
def send(self, channel, msg):
self.log.info('Sending "%s" to %s' % (msg, channel))