Mercurial > libervia-backend
comparison plugins/plugin_xep_0065.py @ 21:633c5ed65701
parameters: new button type (not finished)
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 08 Nov 2009 01:49:08 +0100 |
parents | fc8c202cda87 |
children | bb72c29f3432 |
comparison
equal
deleted
inserted
replaced
20:fc8c202cda87 | 21:633c5ed65701 |
---|---|
466 self.host = host | 466 self.host = host |
467 debug("registering") | 467 debug("registering") |
468 self.server_factory = Socks5ServerFactory() | 468 self.server_factory = Socks5ServerFactory() |
469 self.server_factory.protocol.host = self.host #needed for progress CB | 469 self.server_factory.protocol.host = self.host #needed for progress CB |
470 self.client_factory = Socks5ClientFactory() | 470 self.client_factory = Socks5ClientFactory() |
471 | |
472 #parameters | |
471 host.memory.importParams(self, XEP_0065.params) | 473 host.memory.importParams(self, XEP_0065.params) |
472 host.memory.setDefault("IP", "File Transfert", self.getExternalIP) | 474 host.memory.setDefault("IP", "File Transfert", self.getExternalIP) |
475 | |
473 port = int(self.host.memory.getParamV("Port", "File Transfert")) | 476 port = int(self.host.memory.getParamV("Port", "File Transfert")) |
474 info("Launching Socks5 Stream server on port %d", port) | 477 info("Launching Socks5 Stream server on port %d", port) |
475 reactor.listenTCP(port, self.server_factory) | 478 reactor.listenTCP(port, self.server_factory) |
476 | 479 |
477 def getExternalIP(self): | 480 def getExternalIP(self): |