X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=lib%2Fmuff%2Fmuffsock.py;h=fe4706190282e04d010a82f658bbbccdd6d6a687;hp=40fffa56bdc6d0aab1f07765108a6d05eda48d53;hb=1ff00115321d800bec7313a3fdfc97a8b0b006fa;hpb=994d6e52ce3d5c719991e8f798642cdb8a24b7d1 diff --git a/lib/muff/muffsock.py b/lib/muff/muffsock.py index 40fffa5..fe47061 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() -