# -*- mode: python -*- from twisted.application import service from twisted.application import internet from nevow import appserver from recordbot import RecordBotFactory import parseHistory import webby, nolans config = parseHistory.Config() parseHistory.parseConfig(open("config", "U"), config) parseHistory.parseHistory(open("history.txt", "U"), config) parseHistory.parseHistory(open("c-history.txt", "U"), config) root = webby.Root() players = webby.Players(config) botfactory = RecordBotFactory(config) bot = webby.Bot(botfactory) root.putChild("player", players) root.putChild("bot", bot) root.putChild("form", webby.Form(config)) root.putChild("botalike", webby.Bot(botfactory)) root.putChild("cand", webby.Cand(config)) root.putChild("level", webby.Levels(config)) root.putChild("history.txt", webby.HistoryTxt(config)) root.putChild("reload", webby.Reloader()) root.putChild("nolans", nolans.Admin(config)) application = service.Application("recordbot") internet.TCPServer( 8080, appserver.NevowSite( root ) ).setServiceParent(application) ## internet.TCPClient( ## "uk.quakenet.org", 6667, ## botfactory, ## ).setServiceParent(application)