Browse Source

Boxes example, tcp-proxy cleanup when a module.

Steve Thielemann 5 years ago
parent
commit
6a3d91590f
2 changed files with 8 additions and 4 deletions
  1. 3 0
      boxes.py
  2. 5 4
      tcp-proxy.py

+ 3 - 0
boxes.py

@@ -150,6 +150,9 @@ class Boxes(object):
         """
         """
         Display alert message
         Display alert message
 
 
+        Example:
+        self.queue_game.put(Boxes.alert("Proxy done.", base="green"))
+
         length: the printable character length.
         length: the printable character length.
             If the string contains color codes, you'll need
             If the string contains color codes, you'll need
             to use this so it will be centered properly.
             to use this so it will be centered properly.

+ 5 - 4
tcp-proxy.py

@@ -581,8 +581,9 @@ if __name__ == "__main__":
 else:
 else:
     # I can't seem to get twistd -y tcp-proxy.py
     # I can't seem to get twistd -y tcp-proxy.py
     # to work.  Missing imports?
     # to work.  Missing imports?
-    application = service.Application("TradeWarsGameServer-Proxy")
-    factory = protocol.Factory()
-    factory.protocol = Player
-    internet.TCPServer(config["listen_port"], factory).setServiceParent(application)
+    pass
+    # application = service.Application("TradeWarsGameServer-Proxy")
+    # factory = protocol.Factory()
+    # factory.protocol = Player
+    # internet.TCPServer(config["listen_port"], factory).setServiceParent(application)