Rename internal:network to .mudpy.network
authorJeremy Stanley <fungi@yuggoth.org>
Thu, 15 Sep 2016 06:44:48 +0000 (06:44 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Thu, 15 Sep 2016 06:44:48 +0000 (06:44 +0000)
Convert the old style internal:network element to a new style
.mudpy.network element and adjust the initialize_server_socket()
function accordingly.

etc/mudpy.yaml
lib/mudpy/misc.py

index 512f27f..aaf3db7 100644 (file)
@@ -42,10 +42,8 @@ __control__:
 .mudpy.movement.west.exit_term: to the west
 .mudpy.movement.west.vector: [-1,0,0]
 
-internal:network:
-    host: ::1
-    #host: 127.0.0.1
-    port: 6669
+.mudpy.network.host: '::1'
+.mudpy.network.port: 6669
 
 internal:process:
     #daemon: yes
index 616065b..02f2fba 100644 (file)
@@ -442,8 +442,8 @@ class Universe:
         """Create and open the listening socket."""
 
         # need to know the local address and port number for the listener
-        host = self.categories["internal"]["network"].get("host")
-        port = self.categories["internal"]["network"].get("port")
+        host = self.contents["mudpy.network"].get("host")
+        port = self.contents["mudpy.network"].get("port")
 
         # if no host was specified, bind to all local addresses (preferring
         # ipv6)