Merge branch 'master' of ayu.incorporeal.org:dr.botzo
This commit is contained in:
commit
2875bacae4
|
@ -0,0 +1,2 @@
|
|||
*.pyc
|
||||
*.swp
|
|
@ -0,0 +1,6 @@
|
|||
[IRC]
|
||||
server = irc.foonetic.net
|
||||
port = 6667
|
||||
channel = #lh
|
||||
nick = dr_devzo
|
||||
name = dr. devzo
|
|
@ -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
|
Loading…
Reference in New Issue