Imported from archive.
[mudpy.git] / lib / muff / muffsock.py
index 40fffa5..fe47061 100644 (file)
@@ -27,7 +27,7 @@ def check_for_connection(newsocket):
        connection.setblocking(0)
 
        # create a new user object
-       user = muffuser.User();
+       user = muffuser.User()
 
        # associate this connection with it
        user.connection = connection
@@ -50,7 +50,7 @@ def initialize_server_socket():
        newsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
 
        # bind the socket to to our desired server ipa and port
-       newsocket.bind((muffconf.config_data.get("network", "host"), muffconf.config_data.getint("network", "port")))
+       newsocket.bind((muffconf.get("network", "host"), muffconf.getint("network", "port")))
 
        # disable blocking so we can proceed whether or not we can send/receive
        newsocket.setblocking(0)
@@ -64,13 +64,3 @@ def initialize_server_socket():
        # store this in a globally-accessible place
        muffvars.newsocket = newsocket
 
-def destroy_all_sockets():
-       """Go through all connected users and close their sockets."""
-
-       # note that we're closing all sockets
-       muffmisc.log("Closing remaining connections...")
-
-       # iterate over each connected user and close their associated sockets
-       for user in muffvars.userlist:
-               user.connection.close()
-