]> jfr.im git - irc/quakenet/qwebirc.git/blob - qwebirc/root.py
Add a maximum amount of subscriptions per channel.
[irc/quakenet/qwebirc.git] / qwebirc / root.py
1 from ajaxengine import AJAXEngine
2
3 from twisted.web import resource, server, static
4
5 class RootResource(resource.Resource):
6 def getChild(self, name, request):
7 if name == "":
8 name = "swmui.html"
9 return self.primaryChild.getChild(name, request)
10
11 class RootSite(server.Site):
12 def __init__(self, path, *args, **kwargs):
13 root = RootResource()
14 server.Site.__init__(self, root, *args, **kwargs)
15
16 root.primaryChild = static.File(path)
17 root.putChild("e", AJAXEngine("/e"))