Changed the way server reports logged-in/unlogged-in sessions to the log file.
This commit is contained in:
parent
da51cb063f
commit
06566c3e8f
1 changed files with 4 additions and 5 deletions
|
|
@ -268,15 +268,14 @@ class ServerSession(Session):
|
||||||
String representation of the user session class. We use
|
String representation of the user session class. We use
|
||||||
this a lot in the server logs.
|
this a lot in the server logs.
|
||||||
"""
|
"""
|
||||||
if self.logged_in:
|
symbol = ""
|
||||||
symbol = '#'
|
if self.logged_in and hasattr(self, "player") and self.player:
|
||||||
else:
|
symbol = "(#%s)" % self.player.id
|
||||||
symbol = '?'
|
|
||||||
try:
|
try:
|
||||||
address = ":".join([str(part) for part in self.address])
|
address = ":".join([str(part) for part in self.address])
|
||||||
except Exception:
|
except Exception:
|
||||||
address = self.address
|
address = self.address
|
||||||
return "<%s> %s@%s" % (symbol, self.uname, address)
|
return "%s%s@%s" % (self.uname, symbol, address)
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue