File: startup.py

package info (click to toggle)
phenny 2~hg28-3
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 448 kB
  • ctags: 190
  • sloc: python: 6,520; sh: 607; makefile: 15
file content (26 lines) | stat: -rwxr-xr-x 711 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python
"""
startup.py - Phenny Startup Module
Copyright 2008, Sean B. Palmer, inamidst.com
Licensed under the Eiffel Forum License 2.

http://inamidst.com/phenny/
"""

def startup(phenny, input): 
   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)

   # Cf. http://swhack.com/logs/2005-12-05#T19-32-36
   for channel in phenny.channels: 
      phenny.write(('JOIN', channel))
startup.rule = r'(.*)'
startup.event = '251'
startup.priority = 'low'

if __name__ == '__main__': 
   print __doc__.strip()