X-Git-Url: https://mudpy.org/gitweb?a=blobdiff_plain;f=lib%2Fmuff%2Fmuffsock.py;h=9faefcdfadb8017bc033be06a33d96428d5caa65;hb=b051f2573564ad980d1a3b276eaea78a51571267;hp=c834b9eceaaed7ba04a8b5e694a3fcc3f917048b;hpb=a45e64d15b49910f06d950982b5b052b24e03269;p=mudpy.git diff --git a/lib/muff/muffsock.py b/lib/muff/muffsock.py index c834b9e..9faefcd 100644 --- a/lib/muff/muffsock.py +++ b/lib/muff/muffsock.py @@ -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() -