Conn now holds its own name #2

This commit is contained in:
Luke Rogers 2012-05-07 10:56:56 +12:00
parent f70baa778c
commit 20b6ebd749
1 changed files with 2 additions and 2 deletions

4
bot.py
View File

@ -46,11 +46,11 @@ bot.conns = {}
try:
for name, conf in bot.config['connections'].iteritems():
if conf.get('ssl'):
bot.conns[name] = SSLIRC(conf['server'], conf['nick'], conf=conf,
bot.conns[name] = SSLIRC(name, conf['server'], conf['nick'], conf=conf,
port=conf.get('port', 6667), channels=conf['channels'],
ignore_certificate_errors=conf.get('ignore_cert', True))
else:
bot.conns[name] = IRC(conf['server'], conf['nick'], conf=conf,
bot.conns[name] = IRC(name, conf['server'], conf['nick'], conf=conf,
port=conf.get('port', 6667), channels=conf['channels'])
except Exception, e:
print 'ERROR: malformed config file', e