debug
This commit is contained in:
parent
507c59ad15
commit
a82c7ba5ba
1 changed files with 4 additions and 3 deletions
|
@ -5,7 +5,7 @@ import re
|
|||
import config
|
||||
import irc
|
||||
|
||||
|
||||
# strip all spaces and capitalization from the connection name
|
||||
def clean_name(n): return re.sub('[^A-Za-z0-9_]+', '', n.replace(" ", "_"))
|
||||
|
||||
|
||||
|
@ -27,15 +27,16 @@ class Bot(object):
|
|||
for name, conf in self.config['connections'].iteritems():
|
||||
# strip all spaces and capitalization from the connection name
|
||||
name = clean_name(name)
|
||||
self.logger.debug("({}) Creating connection.".format(name))
|
||||
self.logger.debug("({}) Server: {}".format(name, conf['server']))
|
||||
self.logger.debug("({}) Creating connection to {}.".format(name, conf['server']))
|
||||
if conf.get('ssl'):
|
||||
self.connections[name] = irc.SSLIRC(name, conf['server'], conf['nick'], conf=conf,
|
||||
port=conf.get('port', 6667), channels=conf['channels'],
|
||||
ignore_certificate_errors=conf.get('ignore_cert', True))
|
||||
self.logger.debug("({}) Created SSL connection.".format(name))
|
||||
else:
|
||||
self.connections[name] = irc.IRC(name, conf['server'], conf['nick'], conf=conf,
|
||||
port=conf.get('port', 6667), channels=conf['channels'])
|
||||
self.logger.debug("({}) Created connection.".format(name))
|
||||
|
||||
def setup(self):
|
||||
# logging
|
||||
|
|
Reference in a new issue