def __init__(self, protocol, config): self.factory = IRCClientFactory(protocol, config) protocol.connectTCP(config.get('server'), config.get('port', 6667), self.factory)