Added comprehensive encoding handling to support both player-level encoding choices as well as global multiple encodings through the settings file.
This commit is contained in:
parent
7904916dba
commit
745df8356f
5 changed files with 69 additions and 34 deletions
|
|
@ -253,19 +253,15 @@ class PlayerDB(TypedObject):
|
|||
|
||||
def msg(self, message, from_obj=None, markup=True):
|
||||
"""
|
||||
This duplicates the same-named method on the Character.
|
||||
It forwards messages to the character or uses
|
||||
the session messaging directly.
|
||||
This is the main route for sending data to the user.
|
||||
"""
|
||||
if from_obj:
|
||||
try:
|
||||
from_obj.at_msg_send(message, self)
|
||||
except Exception:
|
||||
pass
|
||||
if self.character:
|
||||
self.character.msg(message, from_obj)
|
||||
else:
|
||||
if from_obj:
|
||||
try:
|
||||
from_obj.at_msg_send(message, self)
|
||||
except Exception:
|
||||
pass
|
||||
if self.at_msg_receive(message, from_obj):
|
||||
if self.character.at_msg_receive(message, from_obj):
|
||||
for session in object.__getattribute__(self, 'sessions'):
|
||||
session.msg(message, markup)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue