Merge branch 'master' of ayu.incorporeal.org:dr.botzo

This commit is contained in:
Brian S. Stephan 2010-07-24 10:15:48 -05:00
commit 2875bacae4
3 changed files with 30 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.pyc
*.swp

6
dr.botzo.cfg Normal file
View File

@ -0,0 +1,6 @@
[IRC]
server = irc.foonetic.net
port = 6667
channel = #lh
nick = dr_devzo
name = dr. devzo

22
dr.botzo.py Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env python3.1
from configparser import *
import os
import sys
config = ConfigParser()
config.read([os.path.expanduser('~/.dr.botzo.cfg'), 'dr.botzo.cfg'])
try:
# load connection info
server = config.get('IRC', 'server')
port = config.getint('IRC', 'port')
channel = config.get('IRC', 'channel')
nick = config.get('IRC', 'nick')
ircname = config.get('IRC', 'name')
except NoSectionError as e:
sys.exit("Aborted due to error with necessary configuration: " + str(e))
except NoOptionError as e:
sys.exit("Aborted due to error with necessary configuration: " + str(e))
# vi:tabstop=4:expandtab:autoindent