Fixed a bug that caused the webclient input line to suddenly reset every three minutes. Thanks to use "lusid" for supplying the hint on fixing this one! Also added a more consistent way of parsing the incoming address.

This commit is contained in:
Griatch 2012-04-01 22:52:12 +02:00
parent ca32950d90
commit 4b56d5a3a4
2 changed files with 16 additions and 10 deletions

View file

@ -272,7 +272,10 @@ class ServerSession(Session):
if self.logged_in and hasattr(self, "player") and self.player:
symbol = "(#%s)" % self.player.id
try:
address = ":".join([str(part) for part in self.address])
if hasattr(self.address, '__iter__'):
address = ":".join([str(part) for part in self.address])
else:
address = self.address
except Exception:
address = self.address
return "%s%s@%s" % (self.uname, symbol, address)