mirror of
https://github.com/evennia/evennia.git
synced 2026-03-27 02:06:32 +01:00
Protect against the User object getting out of sync with the respective Object's name.
This commit is contained in:
parent
914628d385
commit
3ec9f167d4
1 changed files with 5 additions and 0 deletions
|
|
@ -173,6 +173,11 @@ class SessionProtocol(StatefulTelnetProtocol):
|
|||
user.last_login = datetime.now()
|
||||
user.save()
|
||||
|
||||
# In case the account and the object get out of sync, fix it.
|
||||
if pobject.name != user.username:
|
||||
pobject.set_name(user.username)
|
||||
pobject.save()
|
||||
|
||||
def msg(self, message):
|
||||
"""
|
||||
Sends a message to the session.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue