summaryrefslogtreecommitdiffstats
path: root/modules/startup.py
diff options
context:
space:
mode:
authorSean B. Palmer <sbp@aldebaran.local>2012-02-16 17:55:23 +0000
committerSean B. Palmer <sbp@aldebaran.local>2012-02-16 17:55:23 +0000
commit6198b30d76a6e7ce3ba3037f454221cbbc4b0b32 (patch)
tree8af81f74f153e55303773c9a30be0e31abd872be /modules/startup.py
parentc65639d55f7b897b21af98c522a647917327f6ba (diff)
downloadbot-6198b30d76a6e7ce3ba3037f454221cbbc4b0b32.tar.gz
bot-6198b30d76a6e7ce3ba3037f454221cbbc4b0b32.tar.bz2
bot-6198b30d76a6e7ce3ba3037f454221cbbc4b0b32.zip
Throttle channel joins
Diffstat (limited to 'modules/startup.py')
-rwxr-xr-xmodules/startup.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/startup.py b/modules/startup.py
index 48c5fc9..297dfb5 100755
--- a/modules/startup.py
+++ b/modules/startup.py
@@ -53,16 +53,19 @@ def setup(phenny):
phenny.handle_connect = outer_handle_connect
def startup(phenny, input):
+ import time
+
if hasattr(phenny.config, 'serverpass'):
phenny.write(('PASS', phenny.config.serverpass))
if hasattr(phenny.config, 'password'):
phenny.msg('NickServ', 'IDENTIFY %s' % phenny.config.password)
- __import__('time').sleep(5)
+ time.sleep(5)
# Cf. http://swhack.com/logs/2005-12-05#T19-32-36
for channel in phenny.channels:
phenny.write(('JOIN', channel))
+ time.sleep(0.5)
startup.rule = r'(.*)'
startup.event = '251'
startup.priority = 'low'