From: Jeremy Stanley Date: Sat, 15 Jul 2006 18:11:46 +0000 (+0000) Subject: Imported from archive. X-Git-Tag: 0.0.1~319 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=7e176424017ddeeb66e2d6828fd0fd8f5479b5cc Imported from archive. * mudpy.py (User.replace_old_connections): Bug fix to make sure old_user.account actually exists during socket replacement, and is not merely a dangling reference. --- diff --git a/mudpy.py b/mudpy.py index 06563f7..01b9142 100644 --- a/mudpy.py +++ b/mudpy.py @@ -562,7 +562,7 @@ class User: for old_user in universe.userlist: # the name is the same but it's not us - if hasattr(old_user, "account") and old_user.account.get("name") == self.account.get("name") and old_user is not self: + if hasattr(old_user, "account") and old_user.account and old_user.account.get("name") == self.account.get("name") and old_user is not self: # make a note of it log("User " + self.account.get("name") + " reconnected--closing old connection to " + old_user.address + ".", 2)