diff --git a/core/bot.py b/core/bot.py index e936d1c..6230f20 100644 --- a/core/bot.py +++ b/core/bot.py @@ -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