diff options
-rwxr-xr-x | fot.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -6,7 +6,7 @@ from twisted.python import log from twisted.protocols.basic import LineReceiver from twisted.manhole.telnet import Shell -import sys, os, traceback, StringIO, md5 +import os from ConfigParser import ConfigParser @@ -105,7 +105,7 @@ class BotFactory(protocol.ReconnectingClientFactory): protocol.ReconnectingClientFactory.clientConnectionLost(self, connector, reason) print 'Starting per-network instances...' -for server in config.sections(): +for server in (server for server in config.sections() if server.startswith('server/')): if not config.has_option(server,'host') or not config.has_option(server, 'port') or not config.has_option(server, 'channels') or config.has_option(server, 'disabled'): continue channels = [] @@ -118,7 +118,6 @@ for server in config.sections(): factory = BotFactory(server, config.get(server, 'nickname')) reactor.connectTCP(config.get(server, 'host'), config.getint(server, 'port'), factory) -# TODO: Fix user/pass loginfactory = login.getManholeFactory(globals(), os.path.expanduser('~/.fot.users')) reactor.listenTCP(3333, loginfactory) |